i'm writing a code inside a column, but i have an unexpecting size. I think it's a margin, but i don't know where it was .. Does someones had this thing ?
Column(
children: [
Text("test"),
// Here some margin, why ?
Container(
height: 200,
child: ListView.builder(
shrinkWrap: true,
itemCount: answers.length,
itemBuilder: (BuildContext context, int index) {
return Text(answers[index]);
}
),
)
],
);
I tried to put SizedBox instead of my Container but not work. Maybe it's normal ?
I tried to remove SizedBox or Container, to get only my ListView, but this blank is always here.
Here is Flutter Inspector :
The 20 height with green border is the Text "test" before the List
Thanks !
It might the default padding of ListView
. You could try
ListView.builder(
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) {
return Text("answers[$index]");
}),
)