0

I followed this page to change status bar color for different screens in flutter.

As per the above link, to change the status bar color for each screen we should update it before navigating to next screen but this is showing a delay in loading of other widgets as compared to status bar color update. Attaching gif below for reference.

//  Before navigating back to home screen, updating the color of status bar.

     WillPopScope(
      onWillPop: () async {
        changeStatusBarColor(Colors.blue);
        return true;
      },
      child: Scaffold(
         .....
      ))

Is there any other way to update status bar color such that it reflects its update with other widgets on screen ?

[Gif: This may seem a little fast here but its very much noticeable in actual device] enter image description here

Shagun arora
  • 127
  • 9
  • 1
    https://stackoverflow.com/a/62122222/16569443 – Rahul Nov 18 '22 at 17:18
  • This actually helped. Its showing much less delay. If I click very often to change screens then I can see a little bit of delay otherwise its working fine. Thanks for help. – Shagun arora Nov 19 '22 at 07:48

1 Answers1

0

enter image description here

You can do an override, but this will update the entire app with this new colour. Not Sure thats what you want.

mc100p
  • 206
  • 2
  • 3