pushReplacementPath method
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;
}