Flutter - How To Go Full Screen + Hide Status Bar or Bottom Bar

Published: 28 June 2021
on channel: Flutter Mentor
11,384
108

If you make a lot of mobile apps, chances are you'll eventually need to know how to control the users' device display.

If you need to be in full screen, you make it full screen. If you just need to hide the status bar or the bottom bar, then you hide them as well.

Fortunately, this is all very simple. Just use the code below and your app will do exactly what you need it to:

CODE TO COPY:
// hide bottom bar only:
SystemChrome.setEnabledSystemUIOverlays ([SystemUiOverlay.top]);

// hide status bar only:
SystemChrome.setEnabledSystemUIOverlays ([SystemUiOverlay.bottom]);

// go full screen:
SystemChrome.setEnabledSystemUIOverlays ([]);

// return to regular display
SystemChrome.setEnabledSystemUIOverlays(
SystemUiOverlay.values);

TIMESTAMPS:

00:00 - Intro
00:42 - Full Screen On App Opening
02:16 - Removing The Status Bar
04:09 - Removing The Bottom Bar
04:24 - Fullscreen Mode
04:35 - Going Back To Regular Screen Mode
04:54 - Testing The Buttons
05:29 - Like & Subscribe
05:38 - Flutter Mentor Out

#flutter #fullscreen #screendisplay

Credits:

OUTRO SONG:
Mitsubachi by Smith The Mister https://smiththemister.bandcamp.com
Smith The Mister https://bit.ly/Smith-The-Mister-YT
Free Download / Stream: http://bit.ly/mitsubachi
Music promoted by Audio Library    • Mitsubachi – Smith The Mister (No Cop...