feat: Use Android system accent color

This commit is contained in:
Krille Fear 2022-12-24 11:48:48 +01:00
commit a35229bf7d
11 changed files with 183 additions and 113 deletions

View file

@ -8,7 +8,6 @@ abstract class SettingKeys {
static const String showDirectChatsInSpaces =
'chat.fluffy.showDirectChatsInSpaces';
static const String separateChatTypes = 'chat.fluffy.separateChatTypes';
static const String chatColor = 'chat.fluffy.chat_color';
static const String sentry = 'sentry';
static const String theme = 'theme';
static const String amoledEnabled = 'amoled_enabled';

View file

@ -38,15 +38,12 @@ abstract class FluffyThemes {
subtitle2: fallbackTextStyle,
);
static ThemeData buildTheme(Brightness brightness,
[ColorScheme? colorScheme]) =>
static ThemeData buildTheme(Brightness brightness, [Color? seed]) =>
ThemeData(
visualDensity: VisualDensity.standard,
useMaterial3: true,
brightness: brightness,
colorSchemeSeed: AppConfig.colorSchemeSeed ??
colorScheme?.primary ??
AppConfig.chatColor,
colorSchemeSeed: seed ?? AppConfig.colorSchemeSeed,
textTheme: PlatformInfos.isDesktop
? brightness == Brightness.light
? Typography.material2018().black.merge(fallbackTextTheme)