📜  颤振 willpopscope 返回值 - 任何代码示例

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

代码示例1
final return = Navigator.of(context).push(MaterialPageRoute(
    builder: (BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text("New Page"),
        ),
        body: WillPopScope(
          onWillPop: () {
             Navigator.pop(context, false);
             return new Future(() => false);
          },
          child: newPageStuff(),
        ),
      );
    },
));