【发布时间】:2019-09-05 18:28:12
【问题描述】:
我使用 endDrawer 将抽屉添加到我的项目中,以便将其放置在右侧。当我拉抽屉时,应用栏箭头显示并将其他应用栏内容推到右侧。
已经搜索了一些线程。我使用 Navigator.pushReplacement(...) 进入仪表板。尝试将仪表板也设为主页,因为我认为这是导航的东西,但无济于事 !
endDrawer: Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: <Widget>[
Container(
height: 300,
child: DrawerHeader(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
"assets/avatar.png",
width: 90,
),
),
Padding(
padding: const EdgeInsets.all(5.0),
child: Text("Sample Name",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white)),
),
Text("sample@mail.com",
style: TextStyle(fontSize: 16, color: Colors.white)),
// Text()
],
),
decoration: BoxDecoration(
color: Colors.blueAccent,
),
),
),
ListTile(
leading: Icon(Icons.info),
title: Text('About'),
onTap: () {
// Update the state of the app
// ...
// Then close the drawer
Navigator.pop(context);
},
),
ListTile(
leading: Icon(Icons.lock),
title: Text('Privacy Policy'),
onTap: () {
// Update the state of the app
// ...
// Then close the drawer
Navigator.pop(context);
},
),
],
),
),
我需要移除应用栏上显示的箭头
【问题讨论】:
-
您的代码格式错误,请调整以便我们提供帮助。并提供有助于我们发现问题的情况图像。谢谢
-
将应用栏中的
automaticallyImplyLeading设置为false -
这解决了我的问题 anmol.majhail。非常感谢
标签: flutter dart navigation drawer appbar