How to make Expandable card?

前端 未结 3 998
攒了一身酷
攒了一身酷 2021-01-04 20:50

I am new to flutter and I want to make a list of cards like this.

I tried to Understand the original Project but I am not able to figure out.

I just

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-04 21:27

    try to add an ExpansionTile inside a Card, this will expand the Card when you expand the ExpansionTile

    Card(
      child: Padding(
       padding: EdgeInsets.only(
          top: 36.0, left: 6.0, right: 6.0, bottom: 6.0),
          child: ExpansionTile(
          title: Text('Birth of Universe'),
            children: [
             Text('Big Bang'),
             Text('Birth of the Sun'),
             Text('Earth is Born'),
          ],
        ),
      ),
    )
    

提交回复
热议问题