Flutter实现抽屉效果
2021-01-03 本文已影响0人
刘铁崧
-
效果
-
代码
return Scaffold(
appBar: AppBar(
leading: Builder(
builder: (context){
return IconButton(
icon:Icon( Icons.access_alarm),
onPressed: (){
Scaffold.of(context).openDrawer();
}
);
},
),
),
drawer: Container(
width: 300,
child: Drawer(),
),
);