'Is there a way to override the swipe back feature on iOS?

I was wondering if there was a way to override the behavior of the swipe back feature on iOS. I understand that the swipe back essentially just calls Navigator.of(context).pop() but is there any easy way to change that? Say I have a pageView with swiping disabled working as a stepper. Could I override the iOS swipe back gesture to change what the page view is showing instead of having it call Navigator.of(context).pop()?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source