-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
38 lines (32 loc) · 984 Bytes
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import 'package:flutter/material.dart';
import 'package:hueman/data/page_data.dart';
import 'package:hueman/data/save_data.dart';
import 'package:hueman/data/structs.dart';
class App extends StatefulWidget {
const App({super.key});
@override
State<App> createState() => _AppState();
}
class _AppState extends State<App> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) => state.pauseMusic();
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
useMaterial3: true,
colorScheme: const ColorScheme.dark(primary: Colors.white),
fontFamily: 'nunito sans',
),
debugShowCheckedModeBanner: false,
routes: Pages.routes,
initialRoute: Pages.initialRoute,
);
}
}
void main() => loadData().then((_) => runApp(const App()));