3

I am designing a simple web app and the use case requires the status bar color to change as soon as the browser opens.

I tried using the below mentioned code but it seems to work only on android. I want it to work in flutter web. Any solutions or ideas would be appreciated.

void main() {
  SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
    statusBarColor: Color(0xffff3838),
  ));
  configureApp();
  runApp(const MyApp());
}

But the results come as :

enter image description here

I want to change this blue color to orange.

starball
  • 20,030
  • 7
  • 43
  • 238
Arijeet
  • 935
  • 5
  • 19

1 Answers1

0

You can refer to this answer, manifest.json didn't work for me but the index.html worked perfectly.

For examples:

<meta name="theme-color" media="(prefers-color-scheme: light)" content="#FFFFFF">
<meta name="theme-color" media="(prefers-color-scheme: dark)"  content="#000000">

For me:

<meta name="theme-color" content="#FFFFFF">

Note that opacity won't work in this case, solid color only. Good luck!

NhiNgo
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 11 '23 at 07:57