颤振添加到自定义抽屉

时间:2020-08-11 20:17:23

标签: flutter navigation-drawer

经过多年潜伏,我终于遇到了一个我无法用现有问题解决的问题。 我的问题是这个。我正在与一个应用程序的学生团体合作,但对Flutter不太熟悉。我想扩大抽屉,但不知道如何。 我的代码如下:

drawer: CustomDrawer(
    scaffoldKey: _scaffoldKey,
    customListTile: ListTile(
      leading: Icon(Icons.calendar_today),
      title: Text('Calendar'),
      onTap: () {
        Navigator.push(
          context,
          MaterialPageRoute(builder: (context) => CalendarScreen())
        );
      }
    ),
  )

我想添加更多的图块。我该怎么做呢? 谢谢!

1 个答案:

答案 0 :(得分:0)

drawer: Drawer(
child: ListView(
children: <Widget>[
  ListTile(
    title: Text("Ttem 1"),
    trailing: Icon(Icons.arrow_forward),
  ),
  ListTile(
    title: Text("Item 2"),
    trailing: Icon(Icons.arrow_forward),
  ),
 ],
),
),

请尝试这种方式。您将获得问题的解决方案。