popAndPush<T extends Object?, TO extends Object?> method
Future<T?>
popAndPush<
T extends Object?, TO extends Object?>( - String routeName, {
- TO? result,
- Map<String, dynamic> arguments = const {},
- List<String> holdBlocNames = const [],
})
Implementation
Future<T?> popAndPush<T extends Object?, TO extends Object?>(
String routeName, {
TO? result,
Map<String, dynamic> arguments = const {},
List<String> holdBlocNames = const [],
}) {
Map<String, dynamic> newArguments = Map.from(arguments);
newArguments['##holdBlocNames##'] = holdBlocNames;
holdBlocNames.forEach(GlobalStore().pushState);
return state.popAndPushNamed<T, TO>(
routeName,
result: result,
arguments: newArguments,
);
}