Skip to content

Commit

Permalink
[Presentation] Disabled the material3 flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Nov 2, 2022
1 parent bd0b8b3 commit acc781b
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions lib/presentation/shared/extensions/app_theme_type_extensions.dart
Expand Up @@ -43,12 +43,18 @@ extension AppThemeTypeExtensions on AppAccentColorType {
final color = getAccentColor();
switch (theme) {
case AppThemeType.dark:
final colorScheme = ColorScheme.dark(primary: color, secondary: color, primaryVariant: color, secondaryVariant: color);
final colorScheme = ColorScheme.dark(
primary: color,
secondary: color,
primaryContainer: color,
primaryVariant: color,
secondaryVariant: color,
);
final dark = ThemeData.dark().copyWith(
primaryColor: color,
primaryColorLight: color.withOpacity(0.5),
primaryColorDark: color,
useMaterial3: true,
useMaterial3: false,
colorScheme: colorScheme,
);

Expand All @@ -71,8 +77,14 @@ extension AppThemeTypeExtensions on AppAccentColorType {
primaryColor: color,
primaryColorLight: color.withOpacity(0.8),
primaryColorDark: color,
useMaterial3: true,
colorScheme: ColorScheme.light(primary: color, secondary: color),
useMaterial3: false,
colorScheme: ColorScheme.light(
primary: color,
secondary: color,
primaryContainer: color,
primaryVariant: color,
secondaryVariant: color,
),
);
default:
throw Exception('The provided theme = $theme is not valid ');
Expand Down

0 comments on commit acc781b

Please sign in to comment.