push<T extends Object?> method

Future<T?> push<T extends Object?>(
  1. String routeName,
  2. {Map<String, dynamic> arguments = const {},
  3. List<String> holdBlocNames = const []}
)

Implementation

Future<T?> push<T extends Object?>(
  String routeName, {
  Map<String, dynamic> arguments = const {},
  List<String> holdBlocNames = const [],
}) {
  if (_isSameTopRoute(routeName, arguments)) {
    return Future.value();
  }
  Map<String, dynamic> newArguments = Map.from(arguments);
  newArguments['##holdBlocNames##'] = holdBlocNames;
  holdBlocNames.forEach(GlobalStore().pushState);
  return state.pushNamed<T>(routeName, arguments: newArguments);
}