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(
title: 'Gym App',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
themeMode: ThemeMode.system,
darkTheme: ThemeData.dark(),
theme: ThemeData.light(),
initialRoute: '/home',
routes: routes,
navigatorKey: navigatorKey,