I need a layout without an appbar, so the most obvious approach is to just leave out the appbar
tag on the Scaffold
but if I do that the content goes u
You can get the OS padding with MediaQuery
.
You'd have to replace your
margin: const EdgeInsets.only(top: 30.0),
by
margin: MediaQuery.of(context).padding,
Another solution is to wrap your content inside a SafeArea
. Which basically does the same thing.
Wrap your Column with SafeArea
body: new SafeArea(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
new HeaderLayout(),
],
)
) ,
SafeArea is a widget that insets its child by sufficient padding to avoid intrusions by the operating system. For example, this will indent the child by enough to avoid the status bar at the top of the screen.