popUntil method
Pops routes until the given predicate returns true
See Navigator.popUntil for more details
Implementation
void popUntil(RoutePredicate predicate) {
try {
final context = _currentContext;
if (context == null) {
if (_enableLogger) {
debugPrint('NavService.popUntil: No valid context found.');
}
return;
}
Navigator.of(context).popUntil(predicate);
// ignore: avoid_catches_without_on_clauses
} catch (e, st) {
if (_enableLogger) {
debugPrint('NavService.popUntil.exception: $e\n$st');
}
}
}