This is my code
Row(
children: [
Text("title"),
Spacer(),
ConstrainedBox(
constraints: BoxConstraints(
maxHeight: 28,
minWidth: 45
),
child: Container(
decoration: BoxDecoration(
color: Color(0x0A000000),
borderRadius: BorderRadius.all(Radius.circular(4))
),
child: TextField(
),
),
),
SizedBox(width: 4,),
Text("unit")
],
)
TextField will expand as much as possible, how could I make TextField wrap content without
using IntrinsicWidth.
2
Answers
Try below code and remove Spacer form your widget use Expanded widget instead of that
Result Screen->
just you need to wrap the container with Flexible widget:
This Working Fine