diff --git a/lib/pages/OccasionHomePage.dart b/lib/pages/OccasionHomePage.dart index 16840856..f22a9cb7 100644 --- a/lib/pages/OccasionHomePage.dart +++ b/lib/pages/OccasionHomePage.dart @@ -51,9 +51,12 @@ class _OccasionHomePageState extends State with WidgetsBinding @override void didChangeDependencies() { super.didChangeDependencies(); + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( + statusBarColor: ThemeConfig.appBarColor(), systemNavigationBarColor: ThemeConfig.appBarColor(), )); + StylesHelper.setBodyBackgroundColor(ThemeConfig.appBarColor()); StylesHelper.setMetaThemeColor(ThemeConfig.seed1); } diff --git a/lib/services/StylesHelper.dart b/lib/services/StylesHelper.dart index d83cb466..39f7e2de 100644 --- a/lib/services/StylesHelper.dart +++ b/lib/services/StylesHelper.dart @@ -16,4 +16,9 @@ class StylesHelper{ jsInterop.callMethod("setMetaThemeColor", [color.toHexString()]); } } + static void setBodyBackgroundColor(Color color) { + if(kIsWeb) { + jsInterop.callMethod("setBodyBackgroundColor", [color.toHexString()]); + } + } } \ No newline at end of file diff --git a/web/index.html b/web/index.html index cedcaf39..5bc06c48 100644 --- a/web/index.html +++ b/web/index.html @@ -139,6 +139,9 @@ function setMetaThemeColor(color) { document.querySelector('meta[name="theme-color"]').setAttribute("content", color); } + function setBodyBackgroundColor(color) { + document.body.style.backgroundColor = color; + }