Flutter how to add a Expandable menu item inside navigation drawer?

前端 未结 1 2008
灰色年华
灰色年华 2020-12-28 09:01

I want to add expandable menu to drawer items of flutter. How can I achieve this functionality in flutter. Please just point me in the correct direction if ther

相关标签:
1条回答
  • 2020-12-28 09:20

    You have to pass the drawers child property a ListView, and in that ListView you can then use an ExpansionTile. That would look something like this:

    Drawer(
      child: ListView(
        children: <Widget>[
          ExpansionTile(
            title: Text("Expansion Title"),
            children: <Widget>[Text("children 1"), Text("children 2")],
          )
        ],
      ),
    );
    
    0 讨论(0)
提交回复
热议问题