closeUntilLast method Null safety
override
Close the current top most location and every location after it until the last location is visible.
resultMap
of String location path to Object as result for screen.
Implementation
@override
void closeUntilLast({Map<String, Object?>? resultMap}) {
assert(_pages.isNotEmpty, "there's no page in the stack to close");
if (_pages.length == 1) {
return;
}
final Destination lastPageDestination = _pages.first.destination;
closeUntil(location: lastPageDestination.path);
}