I am working on the skeleton of a tablet app with flutter and I am facing, probably a very simple issue, but it is getting tricky for me to figure out what is going on here.
Basically the skeleton of the app should look something like this:
For that, I have written a simple Stateless
class like this:
class BaseDetailsRoute extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey,
body: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Flexible(flex: 1, child: _selectionColumn()),
Flexible(flex: 7, child: _contentArea())
],
),
);
}
Widget _contentArea() => Container(color: Colors.orange,);
Column _selectionColumn() => Column(
children: <Widget>[
Expanded(child: Container(color: Colors.blue,))
],
);
}
Which is giving me ALMOST the expected result:
The little issue here is on the bottom of the screen, as you can see, in the Scaffold
, I have put backgroundColor: Colors.grey
, and, after rendering the Row
in the screen, it seems like for some reason I cannot make it take the whole available height, and I still see a bit of the grey background color of the Scaffold on the bottom.
I have tried wrapping the whole Scaffold inside a SafeArea
widget, but it did not work.
How can I fix this in an easy way, meaning not having to add a bunch of other widgets?