@@ -13,31 +13,17 @@ const _kHeadline1 = TextStyle(fontFamily: 'PermanentMarker', fontSize: 25);
13
13
/// ```
14
14
class CustomTheme extends ChangeNotifier {
15
15
static ThemeData get lightTheme {
16
- final themeData = ThemeData ( );
17
- final colorScheme = themeData.colorScheme
18
- . copyWith (onPrimary : Colors .white, onBackground : Colors .black87 );
19
- return _themeData (themeData, colorScheme);
16
+ final colorScheme = ColorScheme . fromSwatch (backgroundColor : Colors .white );
17
+ final textTheme =
18
+ Typography .blackMountainView. copyWith (headline1 : _kHeadline1 );
19
+ return ThemeData . from (colorScheme : colorScheme, textTheme : textTheme );
20
20
}
21
21
22
22
static ThemeData get darkTheme {
23
- final themeData = ThemeData .dark ();
24
- final colorScheme = themeData.colorScheme
25
- .copyWith (onPrimary: Colors .white, onBackground: Colors .white);
26
- return _themeData (themeData, colorScheme);
27
- }
28
-
29
- static ThemeData _themeData (ThemeData baseTheme, ColorScheme colorScheme) {
30
- final textTheme = baseTheme.textTheme
31
- .copyWith (
32
- headline1: _kHeadline1,
33
- // main_screen에서 키워드에 사용됨
34
- subtitle2: TextStyle (
35
- fontSize: 14 ,
36
- color: colorScheme.onSurface.withAlpha (150 ),
37
- fontStyle: FontStyle .italic))
38
- .apply (displayColor: colorScheme.onBackground);
39
-
40
- return baseTheme.copyWith (colorScheme: colorScheme, textTheme: textTheme);
23
+ const colorScheme = ColorScheme .dark ();
24
+ final textTheme =
25
+ Typography .whiteMountainView.copyWith (headline1: _kHeadline1);
26
+ return ThemeData .from (colorScheme: colorScheme, textTheme: textTheme);
41
27
}
42
28
43
29
bool _isDarkMode = false ;
0 commit comments