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]