@@ -15,43 +15,44 @@ class BaseflowPluginExample extends StatelessWidget {
15
15
16
16
@override
17
17
Widget build (BuildContext context) {
18
- return MaterialApp (
19
- title: 'Baseflow $pluginName ' ,
20
- theme: ThemeData (
21
- accentColor: Colors .white60,
22
- backgroundColor: const Color .fromRGBO (48 , 49 , 60 , 0.8 ),
23
- buttonTheme: ButtonThemeData (
24
- buttonColor: themeMaterialColor.shade500,
25
- disabledColor: themeMaterialColor.withRed (200 ),
26
- splashColor: themeMaterialColor.shade50,
27
- textTheme: ButtonTextTheme .primary,
18
+ final theme = ThemeData (
19
+ backgroundColor: const Color .fromRGBO (48 , 49 , 60 , 0.8 ),
20
+ buttonTheme: ButtonThemeData (
21
+ buttonColor: themeMaterialColor.shade500,
22
+ disabledColor: themeMaterialColor.withRed (200 ),
23
+ splashColor: themeMaterialColor.shade50,
24
+ textTheme: ButtonTextTheme .primary,
25
+ ),
26
+ bottomAppBarColor: const Color .fromRGBO (57 , 58 , 71 , 1 ),
27
+ hintColor: themeMaterialColor.shade500,
28
+ primarySwatch: createMaterialColor (const Color .fromRGBO (48 , 49 , 60 , 1 )),
29
+ textTheme: TextTheme (
30
+ bodyText1: TextStyle (
31
+ color: Colors .white,
32
+ fontSize: 16 ,
33
+ height: 1.3 ,
28
34
),
29
- bottomAppBarColor: const Color .fromRGBO (57 , 58 , 71 , 1 ),
30
- hintColor: themeMaterialColor.shade500,
31
- primarySwatch: createMaterialColor (const Color .fromRGBO (48 , 49 , 60 , 1 )),
32
- textTheme: TextTheme (
33
- bodyText1: TextStyle (
34
- color: Colors .white,
35
- fontSize: 16 ,
36
- height: 1.3 ,
37
- ),
38
- bodyText2: TextStyle (
39
- color: Colors .white,
40
- fontSize: 18 ,
41
- height: 1.2 ,
42
- ),
43
- button: TextStyle (color: Colors .white),
44
- headline1: TextStyle (
45
- color: Colors .white,
46
- fontSize: 18 ,
47
- ),
35
+ bodyText2: TextStyle (
36
+ color: Colors .white,
37
+ fontSize: 18 ,
38
+ height: 1.2 ,
48
39
),
49
- visualDensity : VisualDensity .adaptivePlatformDensity ,
50
- inputDecorationTheme : InputDecorationTheme (
51
- fillColor : const Color . fromRGBO ( 37 , 37 , 37 , 1 ) ,
52
- filled : true ,
40
+ button : TextStyle (color : Colors .white) ,
41
+ headline1 : TextStyle (
42
+ color : Colors .white ,
43
+ fontSize : 18 ,
53
44
),
54
45
),
46
+ visualDensity: VisualDensity .adaptivePlatformDensity,
47
+ inputDecorationTheme: InputDecorationTheme (
48
+ fillColor: const Color .fromRGBO (37 , 37 , 37 , 1 ),
49
+ filled: true ,
50
+ ),
51
+ );
52
+ return MaterialApp (
53
+ title: 'Baseflow $pluginName ' ,
54
+ theme: theme.copyWith (
55
+ colorScheme: theme.colorScheme.copyWith (secondary: Colors .white60)),
55
56
home: AppHome (title: 'Baseflow $pluginName example app' ),
56
57
);
57
58
}
@@ -150,6 +151,8 @@ class _AppHomeState extends State<AppHome> {
150
151
}
151
152
152
153
Color _bottomAppBarIconColor (int page) {
153
- return _currentPage == page ? Colors .white : Theme .of (context).accentColor;
154
+ return _currentPage == page
155
+ ? Colors .white
156
+ : Theme .of (context).colorScheme.secondary;
154
157
}
155
158
}
0 commit comments