Automatically switch theme based on system theme
This commit is contained in:
parent
3ff136f758
commit
fd83fef528
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user