hideStatusBar function

Future<void> hideStatusBar()

Hides both the status bar and navigation bar, making the app fullscreen.

  • Best for immersive experiences like video players and games.
  • To restore, use showStatusBar().

Example Usage:

hideStatusBar();

Implementation

Future<void> hideStatusBar() async {
  SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
}