I don’t know why I set in my container or Image.file the height and width with a BoxFit.fill and it’s not working
Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
[...]
Padding(
padding: ...,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
[...]
Container(
height: 150,
width: MediaQuery.of(context).size.width,
color: Colors.red,
child: Image.file(
File(...),
fit: BoxFit.fill,
),
)
],
),
),
],
),
[...]
],
),
2
Answers
You can try this code
I hope this can work for you.
Do you want to keep the image inside the Red container?