Automatically switch theme based on system theme

This commit is contained in:
Brandon Presley 2023-04-13 15:09:06 +12:00
parent 3ff136f758
commit fd83fef528
1 changed files with 3 additions and 4 deletions

View File

@ -25,10 +25,9 @@ class MyApp extends StatelessWidget {
return MaterialApp( return MaterialApp(
title: 'Gym App', title: 'Gym App',
theme: ThemeData( themeMode: ThemeMode.system,
primarySwatch: Colors.blue, darkTheme: ThemeData.dark(),
visualDensity: VisualDensity.adaptivePlatformDensity, theme: ThemeData.light(),
),
initialRoute: '/home', initialRoute: '/home',
routes: routes, routes: routes,
navigatorKey: navigatorKey, navigatorKey: navigatorKey,