Reputation: 77
I'm working on flutter, and i wanna illustrate some Cards in the ListView, and i succeed.
then i wanna get rid of the horizontal spaces between Cards, I searched and found few solutions, but none of them worked.
How can I remove the spaces?
ListTile(
title:Text(" Board list"),
tileColor: Color(COLOR_PRIMARY2),
),
for(Board myBoard in boardDataList)
BoardSelector(myBoard.boardId), //a class draws card
],
Thank you.
Upvotes: 1
Views: 1448
Reputation: 14835
I think you set margin: EdgeInsets.zero,
you refer EdgeInsets Class for official documentation here and EdgeInsets.zero
here hope its help to you
Card(
margin: EdgeInsets.zero,
child://Your Widget
),
Upvotes: 2
Reputation: 77
I solved this problem by modifying my code like below :
return Card(
margin : EdgeInsets.all(1.0),
child:
ListTile(
Thank you.
Upvotes: 1
Reputation: 36
I think there's an issue with your card class, try to remove any padding property by adding EdgeInsets.zero
Upvotes: 1