diff --git a/lib/main.dart b/lib/main.dart index 7eb68ad..52887a8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -40,6 +40,11 @@ class MyApp extends StatelessWidget { static FirebaseAnalytics analytics = FirebaseAnalytics.instance; static FirebaseAnalyticsObserver observer = FirebaseAnalyticsObserver(analytics: analytics); + static final _defaultLightColorScheme = + ColorScheme.fromSwatch(primarySwatch: Colors.blue); + + static final _defaultDarkColorScheme = ColorScheme.fromSwatch( + primarySwatch: Colors.blue, brightness: Brightness.dark); // This widget is the root of your application. @override @@ -55,11 +60,11 @@ class MyApp extends StatelessWidget { supportedLocales: AppLocalizations.supportedLocales, navigatorObservers: [SentryNavigatorObserver(), observer], theme: ThemeData( - colorScheme: lightColorScheme, + colorScheme: lightColorScheme ?? _defaultLightColorScheme, useMaterial3: true, ), darkTheme: ThemeData( - colorScheme: darkColorScheme, + colorScheme: darkColorScheme ?? _defaultDarkColorScheme, useMaterial3: true, ), themeMode: ThemeMode.dark,