added black color to background and canvas
This commit is contained in:
parent
ffa484d895
commit
f0d508c37a
|
@ -34,18 +34,24 @@ Future<void> main() async {
|
|||
class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) => Observer(
|
||||
builder: (ctx) => MaterialApp(
|
||||
title: 'Flutter Demo',
|
||||
themeMode: ctx.watch<ConfigStore>().theme,
|
||||
darkTheme: ThemeData.dark().copyWith(
|
||||
scaffoldBackgroundColor: ctx.watch<ConfigStore>().amoledDarkMode
|
||||
? Colors.black
|
||||
: null),
|
||||
theme: ThemeData(
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
),
|
||||
home: MyHomePage(title: 'Flutter hello world'),
|
||||
),
|
||||
builder: (ctx) {
|
||||
var maybeAmoledColor =
|
||||
ctx.watch<ConfigStore>().amoledDarkMode ? Colors.black : null;
|
||||
|
||||
return MaterialApp(
|
||||
title: 'Flutter Demo',
|
||||
themeMode: ctx.watch<ConfigStore>().theme,
|
||||
darkTheme: ThemeData.dark().copyWith(
|
||||
scaffoldBackgroundColor: maybeAmoledColor,
|
||||
backgroundColor: maybeAmoledColor,
|
||||
canvasColor: maybeAmoledColor,
|
||||
),
|
||||
theme: ThemeData(
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
),
|
||||
home: MyHomePage(title: 'Flutter hello world'),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue