0

I'm new to flutter.

I want to hide status bar only in splash screen. I have a specific color for the status bar too. Here is the code where i specified color for status bar.

i have used the following code in main method to give a specific color.

   SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
        statusBarIconBrightness: Brightness.dark,
        statusBarColor: colorStyle.statusBar, // status bar color

Now I want to hide status bar only in Splash screen.

When i used

SystemChrome.setEnabledSystemUIOverlays([]);

in splash screen ,the status bar hide throughout the app.

How can i solve this problem.Please find me a solution.

Sana Afreen
  • 157
  • 2
  • 3
  • 9

1 Answers1

-1

This should be done for the android specifically, if i am not wrong then you can use the below code

Use

 <item name="android:windowFullscreen">true</item>

and for the ios you do the following steps

n Your Info.plist add: Status bar is initially hidden YES.

The above both option having same impact.

Additionally

To Hide Status Bar on specific ViewController override prefersStatusBarHidden with true

override var prefersStatusBarHidden: Bool{
    return true
}

if you are still confused the check the links below

ios :Hide status bar in Launch Screen

android :Android status bar hide/change color in splash screen

you can check this also: How to hide Android StatusBar in Flutter

Sagar Acharya
  • 3,397
  • 4
  • 12
  • 34