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