offNamedUntil<T> method
Future<T?> ?
offNamedUntil<T>(
- String page, {
- bool predicate(
- GetPage route
- dynamic arguments,
- String? id,
- Map<
String, String> ? parameters,
override
Implementation
@override
Future<T?>? offNamedUntil<T>(
String page, {
bool Function(GetPage route)? predicate,
dynamic arguments,
String? id,
Map<String, String>? parameters,
}) async {
final args = _buildPageSettings(page, arguments);
final route = _getRouteDecoder<T>(args);
if (route == null) return null;
final newPredicate = predicate ?? (route) => false;
while (_activePages.length > 1 && !newPredicate(_activePages.last.route!)) {
_activePages.removeLast();
}
return _push(route);
}