|
|
@ -60,12 +60,16 @@ abstract class FluffyThemes {
|
|
|
|
static const Duration animationDuration = Duration(milliseconds: 250);
|
|
|
|
static const Duration animationDuration = Duration(milliseconds: 250);
|
|
|
|
static const Curve animationCurve = Curves.easeInOut;
|
|
|
|
static const Curve animationCurve = Curves.easeInOut;
|
|
|
|
|
|
|
|
|
|
|
|
static ThemeData buildTheme(Brightness brightness, [Color? seed]) =>
|
|
|
|
static ThemeData buildTheme(Brightness brightness, [Color? seed]) {
|
|
|
|
ThemeData(
|
|
|
|
final colorScheme = ColorScheme.fromSeed(
|
|
|
|
|
|
|
|
brightness: brightness,
|
|
|
|
|
|
|
|
seedColor: seed ?? AppConfig.colorSchemeSeed ?? AppConfig.primaryColor,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
return ThemeData(
|
|
|
|
visualDensity: VisualDensity.standard,
|
|
|
|
visualDensity: VisualDensity.standard,
|
|
|
|
useMaterial3: true,
|
|
|
|
useMaterial3: true,
|
|
|
|
brightness: brightness,
|
|
|
|
brightness: brightness,
|
|
|
|
colorSchemeSeed: seed ?? AppConfig.colorSchemeSeed,
|
|
|
|
colorScheme: colorScheme,
|
|
|
|
textTheme: PlatformInfos.isDesktop || PlatformInfos.isWeb
|
|
|
|
textTheme: PlatformInfos.isDesktop || PlatformInfos.isWeb
|
|
|
|
? brightness == Brightness.light
|
|
|
|
? brightness == Brightness.light
|
|
|
|
? Typography.material2018().black.merge(fallbackTextTheme)
|
|
|
|
? Typography.material2018().black.merge(fallbackTextTheme)
|
|
|
@ -94,6 +98,8 @@ abstract class FluffyThemes {
|
|
|
|
statusBarColor: Colors.transparent,
|
|
|
|
statusBarColor: Colors.transparent,
|
|
|
|
statusBarIconBrightness: brightness.reversed,
|
|
|
|
statusBarIconBrightness: brightness.reversed,
|
|
|
|
statusBarBrightness: brightness,
|
|
|
|
statusBarBrightness: brightness,
|
|
|
|
|
|
|
|
systemNavigationBarIconBrightness: brightness.reversed,
|
|
|
|
|
|
|
|
systemNavigationBarColor: colorScheme.background,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
textButtonTheme: TextButtonThemeData(
|
|
|
|
textButtonTheme: TextButtonThemeData(
|
|
|
@ -126,6 +132,7 @@ abstract class FluffyThemes {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
extension on Brightness {
|
|
|
|
extension on Brightness {
|
|
|
|
Brightness get reversed =>
|
|
|
|
Brightness get reversed =>
|
|
|
|