pushAndRemoveUntil function
Implementation
Future<dynamic> pushAndRemoveUntil(BuildContext context, Route newRoute,
bool Function(Route<dynamic>) predicate) {
if (!isNavMounted(context)) {
throw "Navigator is unmounted";
}
return Navigator.pushAndRemoveUntil(context, newRoute, predicate);
}