Can't create ExpansionPanelList with Items in Flutter

后端 未结 2 452
鱼传尺愫
鱼传尺愫 2021-01-06 23:57

I\'m new to Flutter so i am trying to get into it. But I\'m hanging on creating an ExpansionPanelList with ExpansionPanels in it. And Like the title says all created in goog

2条回答
  •  攒了一身酷
    2021-01-07 00:35

    There is another way to implement same user experience that is using ExpansionTile inside a ListView

             ListView(
                  shrinkWrap: true,
                  children: [
                    ExpansionTile(
                      leading: Icon(Icons.event),                         
                      title: Text('Test1'),
                      children: [
                        ListTile(title: Text('Title of the item')),
                        ListTile(
                          title: Text('Title of the item2'),
                        )
                      ],
                    ),
                    ExpansionTile(
                      title: Text('Test2'),
                      children: [
                        ListTile(title: Text('Title of the item')),
                        ListTile(
                          title: Text('Title of the item2'),
                        )
                      ],
                    )
                  ],
                )
    

提交回复
热议问题