Home > Software design >  How can I remove spaces between Cards in ListView?
How can I remove spaces between Cards in ListView?

Time:10-02

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.

enter image description here

CodePudding user response:

I think there's an issue with your card class, try to remove any padding property by adding EdgeInsets.zero

CodePudding user response:

I solved this problem by modifying my code like below :

 return Card( 
      margin : EdgeInsets.all(1.0),
      child:
      ListTile(

Thank you.

  • Related