From cf97068d7bf17e089cf2c79b25d778f95541d60a Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 27 Sep 2024 14:27:13 -0400 Subject: [PATCH] Format main.dart --- lib/main.dart | 68 +++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index a5a3047..9cb6745 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -85,44 +85,44 @@ class _AppState extends State { return MaterialApp( theme: brightness == Brightness.light ? lightTheme : darkTheme, home: Scaffold( - body: PlatformProvider( - //initialPlatform: initialPlatform, - builder: (context) => PlatformApp( - debugShowCheckedModeBanner: false, - localizationsDelegates: >[ - DefaultMaterialLocalizations.delegate, - DefaultWidgetsLocalizations.delegate, - DefaultCupertinoLocalizations.delegate, - ], - title: 'Nebula', - material: (_, __) { - return new MaterialAppData( - themeMode: brightness == Brightness.light ? ThemeMode.light : ThemeMode.dark, - ); - }, - cupertino: (_, __) => CupertinoAppData( - theme: CupertinoThemeData(brightness: brightness), - ), - onGenerateRoute: (settings) { - if (settings.name == '/') { - return platformPageRoute(context: context, builder: (context) => MainScreen(this.dnEnrolled)); - } - - final uri = Uri.parse(settings.name!); - if (uri.path == EnrollmentScreen.routeName) { - // TODO: maybe implement this as a dialog instead of a page, you can stack multiple enrollment screens which is annoying in dev - return platformPageRoute( - context: context, - builder: (context) => - EnrollmentScreen(code: EnrollmentScreen.parseCode(settings.name!), stream: this.dnEnrolled), + body: PlatformProvider( + //initialPlatform: initialPlatform, + builder: (context) => PlatformApp( + debugShowCheckedModeBanner: false, + localizationsDelegates: >[ + DefaultMaterialLocalizations.delegate, + DefaultWidgetsLocalizations.delegate, + DefaultCupertinoLocalizations.delegate, + ], + title: 'Nebula', + material: (_, __) { + return new MaterialAppData( + themeMode: brightness == Brightness.light ? ThemeMode.light : ThemeMode.dark, ); - } + }, + cupertino: (_, __) => CupertinoAppData( + theme: CupertinoThemeData(brightness: brightness), + ), + onGenerateRoute: (settings) { + if (settings.name == '/') { + return platformPageRoute(context: context, builder: (context) => MainScreen(this.dnEnrolled)); + } - return null; - }, + final uri = Uri.parse(settings.name!); + if (uri.path == EnrollmentScreen.routeName) { + // TODO: maybe implement this as a dialog instead of a page, you can stack multiple enrollment screens which is annoying in dev + return platformPageRoute( + context: context, + builder: (context) => + EnrollmentScreen(code: EnrollmentScreen.parseCode(settings.name!), stream: this.dnEnrolled), + ); + } + + return null; + }, + ), ), ), - ), ); } }