ifRouteChanged method
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);
}