preventing the back button of ios to swipe in Flutter code example
Example: flutter ios disable back gesture
// Wrap your widget tree with the [WillPopScope] widget.
// The Android back button and AppBar back button will still work.
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async => !Navigator.of(context).userGestureInProgress,
child: /* ... */
);
}