offAllNamed method
Navigates off all named pages and returns a result of type T
.
Implementation
@override
Future<T?>? offAllNamed(
String newRouteName, {
Object? arguments,
String? id,
Map<String, String>? parameters,
}) async {
final PageSettings args = _buildPageSettings(newRouteName, arguments);
final RouteDecoder<T>? route = _getRouteDecoder(args);
if (route == null) {
return null;
}
while (_activePages.length > 1) {
_activePages.removeLast();
}
return _replaceNamed(route);
}