popCurrentRouteOfTypeIfAny<T extends Route> function

void popCurrentRouteOfTypeIfAny<T extends Route>(
  1. BuildContext context
)

Implementation

void popCurrentRouteOfTypeIfAny<T extends Route>(BuildContext context) {
  Route currentRoute = getCurrentRoute(context);
  if (currentRoute is T)
    currentRoute.navigator!.pop();
}