pushReplacementPath method

Future pushReplacementPath(
  1. String path, [
  2. Map<String, dynamic>? params
])

Pushes a new route and replace all the previous routes.

Implementation

Future<dynamic> pushReplacementPath(String path, [Map<String, dynamic>? params]) async {
  Completer completer = Completer();
  appRouteDataList = [];
  _addPath(path, completer, params);
  notifyListeners();
  return completer.future;
}