I have this layout:
OverlayEntry _createOverlayEntry() {
RenderBox renderBox = context.findRenderObject();
var size = renderBox.size;
var offset = renderBox.localToGlobal(Offset.zero);
return OverlayEntry(
builder: (context) => Positioned(
left: offset.dx,
top: offset.dy + 38.0,
width: size.width,
child: Material(
elevation: 6.0,
child: Padding(
padding: EdgeInsets.all(8.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(right: 8.0),
child: Icon(Icons.check_box_outline_blank),
),
Column(
children: <Widget>[
Container(
height: 30.0,
width: 100.0,
color: Colors.green,
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: "New To-Do"
),
),
),
Container(
height: 30.0,
width: 100.0,
color: Colors.blue,
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: "Notes"
),
),
)
],
)
],
),
)
),
)
);
}
Which gives me this ui:
Now I would like to not set a hardcoded width and height for the TextField's and have them take just the height they need and all the remaning width the column offers. I tried with the following layout but it crashes with the message "RenderFlex children have non-zero flex but incoming height constraints are unbounded", so could you help explain how I can do this in Flutter please?
