【发布时间】:2020-12-15 14:24:59
【问题描述】:
我尝试制作一个打开抽屉的按钮,但我做不到,这是我第一次使用颤振
我的跑步界面
return Scaffold(
drawer: Drawer(),
body: Column(
children: <Widget>[
ClipPath(
clipper: MyClipper(),
child: Container(
height: 350,
width: double.infinity,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: [
Color(0xFF3383CD),
Color(0xFF11429F),
]),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const SizedBox(height: 12),
IconButton(
icon: const Icon(
Icons.add, size: 18,
color: Colors.white,
),
onPressed: () {
Scaffold.of(context).openDrawer();
},
),
【问题讨论】:
-
这能回答你的问题吗? Open drawer on clicking AppBar
标签: flutter flutter-layout flutter-web flutter-animation flutter-test