fix: Material you improvements (#60)

This commit is contained in:
Aunali321
2022-09-06 18:07:23 +01:00
committed by Alberto Ponces
parent 27ef74b561
commit 10fbbe845e
3 changed files with 49 additions and 3 deletions

View File

@@ -24,12 +24,39 @@ class DynamicThemeBuilder extends StatelessWidget {
builder: (lightColorScheme, darkColorScheme) {
ThemeData lightDynamicTheme = ThemeData(
useMaterial3: true,
canvasColor: lightColorScheme?.background,
navigationBarTheme: NavigationBarThemeData(
backgroundColor: lightColorScheme?.background,
indicatorColor: lightColorScheme?.primary.withAlpha(150),
labelTextStyle: MaterialStateProperty.all(
const TextStyle(
fontWeight: FontWeight.w500,
),
),
),
scaffoldBackgroundColor: lightColorScheme?.background,
colorScheme: lightColorScheme?.harmonized(),
toggleableActiveColor: lightColorScheme?.primary,
textTheme: GoogleFonts.robotoTextTheme(ThemeData.light().textTheme),
);
ThemeData darkDynamicTheme = ThemeData(
useMaterial3: true,
canvasColor: darkColorScheme?.background,
navigationBarTheme: NavigationBarThemeData(
backgroundColor: darkColorScheme?.background,
indicatorColor: darkColorScheme?.primary.withOpacity(0.4),
labelTextStyle: MaterialStateProperty.all(
const TextStyle(
fontWeight: FontWeight.w500,
),
),
iconTheme: MaterialStateProperty.all(
const IconThemeData(
color: Colors.white,
),
),
),
scaffoldBackgroundColor: darkColorScheme?.background,
colorScheme: darkColorScheme?.harmonized(),
toggleableActiveColor: darkColorScheme?.primary,
textTheme: GoogleFonts.robotoTextTheme(ThemeData.dark().textTheme),
@@ -42,7 +69,7 @@ class DynamicThemeBuilder extends StatelessWidget {
2: lightDynamicTheme,
3: darkDynamicTheme,
},
fallbackTheme: lightCustomTheme,
fallbackTheme: darkCustomTheme,
),
builder: (context, theme) => MaterialApp(
debugShowCheckedModeBanner: false,