📜  Flutter ios 禁用后退手势 - Dart 代码示例

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

代码示例1
// Wrap your widget tree with the [WillPopScope] widget.
// The Android back button and AppBar back button will still work.
@override
Widget build(BuildContext context) {
  return WillPopScope(
    onWillPop: () async => !Navigator.of(context).userGestureInProgress,
    child: /* ... */
  );
}