isPopGestureInProgress static method

bool isPopGestureInProgress(
  1. BuildContext context
)

True if an iOS-style back swipe pop gesture is currently underway for route.

This just check the route's NavigatorState.userGestureInProgress.

See also:

  • popGestureEnabled, which returns true if a user-triggered pop gesture would be allowed.

Implementation

static bool isPopGestureInProgress(BuildContext context) {
  final route = ModalRoute.of(context)!;
  return route.navigator!.userGestureInProgress;
}