init method
Calls Services.init and Models.init while monitoring for errors.
Implementation
Future<void> init() async {
try {
await SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight]);
current = "Flutter";
WidgetsFlutterBinding.ensureInitialized();
current = "services";
await services.init();
current = "models";
await models.init();
if (models.settings.easterEggs.segaIntro) await initAnimation();
if (mounted) {
await Navigator.of(context).pushReplacementNamed(Routes.home);
}
} catch (error, stackTrace) {
setState(() => errorText = "$error\n$stackTrace");
rethrow;
}
}