@@ -34,6 +34,10 @@ extension ColorSchemeExtension on ColorScheme {
3434 : const Color .fromARGB (255 , 10 , 10 , 10 );
3535}
3636
37+ Color _blendColors (Color base , Color tint, double ratio) {
38+ return Color .lerp (base , tint, ratio) ?? base ;
39+ }
40+
3741final GlobalKey <NavigatorState > navigatorKey = GlobalKey <NavigatorState >();
3842
3943final lastPausedProvider =
@@ -109,6 +113,15 @@ class MyApp extends ConsumerWidget {
109113 brightness: Brightness .light,
110114 seedColor: const Color .fromARGB (255 , 26 , 161 , 143 ),
111115 );
116+
117+ kColorScheme = kColorScheme.copyWith (
118+ primaryContainer: _blendColors (
119+ kColorScheme.surfaceContainer,
120+ kColorScheme.primary,
121+ 0.08 ,
122+ ),
123+ onPrimaryContainer: kColorScheme.primary,
124+ );
112125
113126 var kDarkColorScheme = ColorScheme .fromSeed (
114127 brightness: Brightness .dark,
@@ -121,57 +134,69 @@ class MyApp extends ConsumerWidget {
121134 return AppLifecycleObserver (
122135 child: MaterialApp (
123136 navigatorKey: navigatorKey,
124- theme: ThemeData ().copyWith (
137+ theme: ThemeData (
138+ useMaterial3: true ,
139+ ).copyWith (
125140 colorScheme: kColorScheme,
126141 brightness: Brightness .light,
142+ scaffoldBackgroundColor: kColorScheme.surfaceContainerHighest,
127143 textTheme: textTheme,
128144 appBarTheme: const AppBarTheme ().copyWith (
129- backgroundColor: kColorScheme.primary,
130- foregroundColor: kColorScheme.onPrimary,
145+ backgroundColor: kColorScheme.surfaceContainerHighest,
146+ foregroundColor: kColorScheme.onSurface,
147+ elevation: 0 ,
131148 ),
132149 cardTheme: CardThemeData (
133150 color: kColorScheme.surfaceContainer,
134151 margin: const EdgeInsets .symmetric (horizontal: 16 , vertical: 8 )),
135152 elevatedButtonTheme: ElevatedButtonThemeData (
136153 style: ElevatedButton .styleFrom (
137154 shape: RoundedRectangleBorder (
138- borderRadius: BorderRadius .circular (5 )),
139- backgroundColor: kColorScheme.primaryContainer),
155+ borderRadius: BorderRadius .circular (12 )),
156+ backgroundColor: kColorScheme.primaryContainer,
157+ foregroundColor: kColorScheme.onPrimaryContainer),
140158 ),
141159 expansionTileTheme: const ExpansionTileThemeData ().copyWith (
142- backgroundColor: kColorScheme.backgroundDarker ,
143- collapsedBackgroundColor: ThemeData ().colorScheme.surface ),
160+ backgroundColor: kColorScheme.surfaceContainerHighest ,
161+ collapsedBackgroundColor: kColorScheme.surfaceContainerHighest ),
144162 bottomNavigationBarTheme:
145163 const BottomNavigationBarThemeData ().copyWith (
164+ backgroundColor: kColorScheme.surfaceContainerHighest,
146165 selectedItemColor: kColorScheme.primary,
147166 unselectedItemColor: kColorScheme.secondary,
167+ elevation: 0 ,
148168 ),
149169 ),
150170 darkTheme: ThemeData (
151171 useMaterial3: true ,
152172 colorScheme: kDarkColorScheme,
153173 brightness: Brightness .dark,
174+ scaffoldBackgroundColor: kDarkColorScheme.surfaceContainerHighest,
154175 textTheme: textTheme,
155176 appBarTheme: const AppBarTheme ().copyWith (
156- backgroundColor: kDarkColorScheme.primaryContainer,
157- foregroundColor: kDarkColorScheme.onPrimaryContainer,
177+ backgroundColor: kDarkColorScheme.surfaceContainerHighest,
178+ foregroundColor: kDarkColorScheme.onSurface,
179+ elevation: 0 ,
158180 ),
159181 cardTheme: CardThemeData (
160182 color: kDarkColorScheme.surfaceContainer,
161183 margin: const EdgeInsets .symmetric (horizontal: 16 , vertical: 8 )),
162184 elevatedButtonTheme: ElevatedButtonThemeData (
163185 style: ElevatedButton .styleFrom (
164186 shape: RoundedRectangleBorder (
165- borderRadius: BorderRadius .circular (5 )),
166- backgroundColor: kDarkColorScheme.primaryContainer),
187+ borderRadius: BorderRadius .circular (12 )),
188+ backgroundColor: kDarkColorScheme.primaryContainer,
189+ foregroundColor: kDarkColorScheme.onPrimaryContainer),
167190 ),
168191 expansionTileTheme: const ExpansionTileThemeData ().copyWith (
169- backgroundColor: kDarkColorScheme.backgroundDarker ,
170- collapsedBackgroundColor: kDarkColorScheme.surface ),
192+ backgroundColor: kDarkColorScheme.surfaceContainerHighest ,
193+ collapsedBackgroundColor: kDarkColorScheme.surfaceContainerHighest ),
171194 bottomNavigationBarTheme:
172195 const BottomNavigationBarThemeData ().copyWith (
196+ backgroundColor: kDarkColorScheme.surfaceContainerHighest,
173197 selectedItemColor: kDarkColorScheme.primary,
174198 unselectedItemColor: kDarkColorScheme.secondary,
199+ elevation: 0 ,
175200 ),
176201 ),
177202 themeMode: themeMode,
0 commit comments