Skip to content

Commit

Permalink
Merge branch 'main' into prod/festapp
Browse files Browse the repository at this point in the history
  • Loading branch information
miakh committed Nov 19, 2024
2 parents 576a5a2 + 050721d commit a883df6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/pages/OccasionHomePage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ class _OccasionHomePageState extends State<OccasionHomePage> with WidgetsBinding
@override
void didChangeDependencies() {
super.didChangeDependencies();

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: ThemeConfig.appBarColor(),
systemNavigationBarColor: ThemeConfig.appBarColor(),
));
StylesHelper.setBodyBackgroundColor(ThemeConfig.appBarColor());
StylesHelper.setMetaThemeColor(ThemeConfig.seed1);
}

Expand Down
5 changes: 5 additions & 0 deletions lib/services/StylesHelper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ class StylesHelper{
jsInterop.callMethod("setMetaThemeColor", [color.toHexString()]);
}
}
static void setBodyBackgroundColor(Color color) {
if(kIsWeb) {
jsInterop.callMethod("setBodyBackgroundColor", [color.toHexString()]);
}
}
}
3 changes: 3 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
function setMetaThemeColor(color) {
document.querySelector('meta[name="theme-color"]').setAttribute("content", color);
}
function setBodyBackgroundColor(color) {
document.body.style.backgroundColor = color;
}
</script>
</head>
<body>
Expand Down

0 comments on commit a883df6

Please sign in to comment.