In my Flutter project I am trying to reduce unecessary spacing after the rows
I have the following UI in a flutter project
for (final stuff in stuffs)
if (stuff.item == item.id)
Row(
children: <Widget>[
const Expanded(
flex: 1,
child: Text('Order: '),
),
Expanded(
flex: 1,
child: ListTile(
title: Text(stuff.order.toString()),
),
),
const Expanded(
flex: 1,
child: Text('Reps: '),
),
Expanded(
flex: 1,
child: ListTile(
title: Text(stuff.repetitions.toString()),
),
),
IconButton(
icon: const Icon(Icons.edit),
onPressed: () async {},
),
IconButton(
icon: Icon(Icons.delete),
onPressed: () async {},
),
],
),
My question and objective is how to reduce the spacing between each iteration. I want to minimize it as much as possible to reduce uneeded spacing
2
Answers
you can try wrapping the
Row widget
in aSizedBox
widget with a smaller height.ListTile comes with default height, For your case you can remove ListTile widget. Also Check padding on
IconButton
, you may just needInkWell