@@ -17,43 +17,41 @@ class App extends StatelessWidget {
17
17
const App ({super .key});
18
18
19
19
@override
20
- Widget build (BuildContext context) {
21
- return MaterialApp (
22
- localizationsDelegates : AppLocalizations .localizationsDelegates ,
23
- supportedLocales : supportedLocales ,
24
- onGenerateTitle : (context) => 'MusicPod' ,
25
- debugShowCheckedModeBanner : false ,
26
- theme : yaruLight,
27
- darkTheme : yaruDark .copyWith (
28
- tabBarTheme : TabBarTheme . of (context). copyWith (
29
- labelColor : Colors .white,
30
- unselectedLabelColor : Colors .white. withValues (
31
- alpha : 0.8 ,
20
+ Widget build (BuildContext context) => MaterialApp (
21
+ localizationsDelegates : AppLocalizations .localizationsDelegates,
22
+ supportedLocales : supportedLocales ,
23
+ onGenerateTitle : (context) => 'MusicPod' ,
24
+ debugShowCheckedModeBanner : false ,
25
+ theme : yaruLight ,
26
+ darkTheme : yaruDark. copyWith (
27
+ tabBarTheme : TabBarTheme . of (context) .copyWith (
28
+ labelColor : Colors .white,
29
+ unselectedLabelColor : Colors .white. withValues (
30
+ alpha : 0.8 ,
31
+ ) ,
32
32
),
33
33
),
34
- ),
35
- home: const StartPage (),
36
- scrollBehavior: const MaterialScrollBehavior ().copyWith (
37
- dragDevices: {
38
- PointerDeviceKind .mouse,
39
- PointerDeviceKind .touch,
40
- PointerDeviceKind .stylus,
41
- PointerDeviceKind .unknown,
42
- PointerDeviceKind .trackpad,
43
- },
44
- ),
45
- );
46
- }
34
+ home: const _StartPage (),
35
+ scrollBehavior: const MaterialScrollBehavior ().copyWith (
36
+ dragDevices: {
37
+ PointerDeviceKind .mouse,
38
+ PointerDeviceKind .touch,
39
+ PointerDeviceKind .stylus,
40
+ PointerDeviceKind .unknown,
41
+ PointerDeviceKind .trackpad,
42
+ },
43
+ ),
44
+ );
47
45
}
48
46
49
- class StartPage extends StatefulWidget {
50
- const StartPage ({ super .key} );
47
+ class _StartPage extends StatefulWidget {
48
+ const _StartPage ( );
51
49
52
50
@override
53
- State <StartPage > createState () => _StartPageState ();
51
+ State <_StartPage > createState () => _StartPageState ();
54
52
}
55
53
56
- class _StartPageState extends State <StartPage > {
54
+ class _StartPageState extends State <_StartPage > {
57
55
late final Future <void > _allReady;
58
56
59
57
@override
@@ -66,12 +64,12 @@ class _StartPageState extends State<StartPage> {
66
64
Widget build (BuildContext context) => FutureBuilder (
67
65
future: _allReady,
68
66
builder: (context, snapshot) =>
69
- snapshot.hasData ? const AppPage () : const LoadingPage (),
67
+ snapshot.hasData ? const _AppPage () : const _LoadingPage (),
70
68
);
71
69
}
72
70
73
- class LoadingPage extends StatelessWidget {
74
- const LoadingPage ({ super .key} );
71
+ class _LoadingPage extends StatelessWidget {
72
+ const _LoadingPage ( );
75
73
76
74
@override
77
75
Widget build (BuildContext context) => const Scaffold (
@@ -85,14 +83,14 @@ class LoadingPage extends StatelessWidget {
85
83
);
86
84
}
87
85
88
- class AppPage extends StatefulWidget with WatchItStatefulWidgetMixin {
89
- const AppPage ({ super .key} );
86
+ class _AppPage extends StatefulWidget with WatchItStatefulWidgetMixin {
87
+ const _AppPage ( );
90
88
91
89
@override
92
- State <AppPage > createState () => _AppPageState ();
90
+ State <_AppPage > createState () => _AppPageState ();
93
91
}
94
92
95
- class _AppPageState extends State <AppPage > {
93
+ class _AppPageState extends State <_AppPage > {
96
94
@override
97
95
void initState () {
98
96
di <WeatherModel >().loadWeather ();
0 commit comments