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(
|
||||
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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user