In flutter, I'd like to have a Container with a fixed height and 100% width.
To accomplish this, I used:
Row(
children: <Widget>[
Flexible(
child: Container(
color: Colors.blue,
height: 40.0,
),
),
],
),
Now, I'd like to offset this row a few pixels offscreen. To accomplish this, I'm attempting to use:
Stack(
children: <Widget>[
Positioned(
left: -5.0,
child: Row(
children: <Widget>[
Flexible(
child: Container(
color: Colors.blue,
height: 40.0,
),
),
],
),
),
],
),
This gives me the error:
The following assertion was thrown during performLayout(): RenderFlex children have non-zero flex but incoming width constraints are unbounded.
How would I create this layout effect?