Check out example codes for "flutter ios disable back gesture". It will help you in understanding the concepts better.

Code Example 1

// 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: /* ... */

Learn ReactJs, React Native from