I have the following layout
Container(
color: Colors.red,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
'You have pushed the button this many times:',
),
Container(
color: Colors.blue,
child: const Text(
'You have pushed the',
),
),
],
),
),
I would like the nested Container (the one with the blue background) the have at least the width of the parent Container.
Using double.infinity does not do the job, since it will stretch the width to the whole available width on the screen.
Thank you
Edit: So the only answer that worked for me was this one https://stackoverflow.com/a/64874106/3808307 (using the width instead of the height). I wonder if there is a way to achieve it without having to have post frame callback