【发布时间】:2023-03-10 18:28:02
【问题描述】:
所以我有一个带有这个应用栏的应用,它有这个按钮。当用户按下按钮时,它会打开抽屉。但是,当您向左滑动时,它也会打开抽屉。
这是图片:The Button
这是我的代码:
return Scaffold(
appBar: AppBar(
title: Text(
"AppBar",
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
fontFamily: "FjallaOne"),
),
backgroundColor: Color(0xFFF0D5EAF),
),
body: Container(
child: ScrollView(),
),
drawer: Drawer(
child: ListView(
children: [
Text(
"Hello world",
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
],
),
),
);
如何禁用按钮?我只想让用户向左滑动,但屏幕上没有显示按钮。
感谢任何答案,谢谢!
【问题讨论】:
-
将
AppBar的automaticallyImplyLeading设置为false。 -
@rickimaru,谢谢!它就像一个魅力
标签: android flutter dart flutter-layout