How to create container width same width as parent?
return Container(
height:
100, //when ListView has no constrained height; it gets an infinite height https://stackoverflow.com/questions/67778027/error-renderbox-was-not-laid-out-failed-assertion-line-1940-pos-12-hassize
child: ListView.builder(
//https://api.flutter.dev/flutter/widgets/ListView-class.html
padding: const EdgeInsets.all(8),
//shrinkWrap: true,
itemCount: entries.length,
itemBuilder: (BuildContext context, int index) {
return(Container(
height: 50,
color: Colors.amber[colorCodes[index % 2]],
child: Row(children: [
//Center(child: Text(entries[index])),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Container( //<-- make this container same width as parent
width: double.infinity, //doesn't work
child: Column(children: [
Text("hello"),
Expanded(child:
Align(alignment: Alignment.bottomLeft,
child:
LinearProgressIndicator(
minHeight: 5,
backgroundColor: Colors.redAccent,
value: 0.50)))
],
))),
])
//child: Center(child: LinearProgressIndicator(backgroundColor: Colors.greenAccent,value: 20))
));
}),
);
Terminal: Another exception was thrown: BoxConstraints forces an infinite width.
Question: how to make width row(or at least it's children) same as screenwidth? Same with columnheight?