main function

void main()

The main entry point of the application. It initializes the necessary dependencies and runs the app.

Implementation

void main() async {
	WidgetsFlutterBinding.ensureInitialized();
	SharedPreferences prefs = await SharedPreferences.getInstance();
	ThemeMode themeMode = ThemeMode.values[prefs.getInt('themeMode') ?? 0];
	runApp(MaterialApp(home: MainApp(themeMode: themeMode)));
}