📜  颤振脚手架打开抽屉 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:44.755000             🧑  作者: Mango

代码示例1
@override
Widget build(BuildContext context) {
  return Scaffold(
    drawer: Drawer(),
    floatingActionButton: Builder(builder: (context) {
      return FloatingActionButton(
        onPressed: () => Scaffold.of(context).openDrawer(), // <-- Opens drawer.
      );
    }),
  );
}