backAndtoNamed method
Navigates back to a named page with an optional result and arguments.
Implementation
@override
Future<T?> backAndtoNamed(
String page, {
Object? result,
Object? arguments,
}) async {
final PageSettings args = _buildPageSettings(page, arguments);
final RouteDecoder<T>? route = _getRouteDecoder(args);
if (route == null) {
return null;
}
_popWithResult(result as T?);
return _push(route);
}