どうも、ちょげ(@chogetarou)です。
Drawerを右に配置する方法を紹介します。
方法
Drawerを右に配置するには、Scaffoldの引数「endDrawer」を使います。
Scaffoldの引数「drawer」に指定しているDrawerを、引数「endDrawer」に指定します。
Scaffold(
appBar: AppBar(),
endDrawer: Drawer(),
),
これでDrawerを右に配置することが出来ます。
使用例
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppBar(),
endDrawer: Drawer(),
),
);
}
コメント