flutter dynamic expansionTile

前端 未结 3 2022
南方客
南方客 2020-12-16 06:10

Looking for some guidance on building expansionTile list dynamically. I have a successful Listview built dynamically from json API, but can not find any examples on buildin

3条回答
  •  萌比男神i
    2020-12-16 06:44

    I think the best way to tackle this is to use a FutureBuilder (maybe have a look at this answer). I would implement one FutureBuilder for the ExpansionTile titles and a second one for each ExpansionTile body.
    The example in the above linked answer could be very well adapted to your use case.

    If you need more help, just shout and I will try to implement an example for you.

提交回复
热议问题