ifRouteChanged method

bool ifRouteChanged(
  1. BuildContext context
)

This method can only be called if the context parameter was passed to the BackButtonInterceptor.add() method.

Implementation

bool ifRouteChanged(BuildContext context) {
  if (routeWhenAdded == null)
    throw AssertionError("The ifRouteChanged() method "
        "can only be called if the context parameter was "
        "passed to the BackButtonInterceptor.add() method.");

  return !identical(currentRoute(context), routeWhenAdded);
}