How to prevent widgets from being hidden behind the system status bar

Viewed 336

So I am creating a new flutter widget and I am unable to understand how my app looks because of the space on top of the screen in my emulator,

enter image description here

As you can see there is a shaded area on top and my widgets are under it, is there any way to remove it?

2 Answers

Use Safe Area.

SafeArea is basically a glorified Padding widget. If you wrap another widget with SafeArea, it adds any necessary padding needed to keep your widget from being blocked by the system status bar, notches, holes, rounded corners, and other "creative" features by manufacturers.

Check this link for more.

Wrap your code with the SafeArea.

more info about SafeArea class

Related