Member-only story

SafeArea Flutter Widget

On today’s devices, apps rarely get a neat little rectangle to run in, notification bars and controls can creep in, and routed corners and notches snippers your content, complicating layouts.

That’s why flutter has SafeArea. It uses a MediaQuery to check the dimensions of the screen and pads its child to match.

So if your app looks like this:

Wrap it in a SafeArea and keep your content safe on both iOS and Android.

You can even specify which dimensions you care about

And wrapping the body of a scaffold works great. 😁

--

--

Flutter Developer
Flutter Developer

Written by Flutter Developer

Flutter and Native Android developer

No responses yet