resetApplication method

  1. @override
Future<void> resetApplication(
  1. BeagleRoute route, [
  2. String? controllerId
])
override

Removes the entire navigation history and starts it over by navigating to a new initial route (passed as parameter).

The parameter controllerId is optional and it specifies the NavigationController to use for this specific stack.

Returns a Future that resolves as soon as the navigation completes.

Implementation

@override
Future<void> resetApplication(BeagleRoute route, [String? controllerId]) async {
  _history = [];
  _thisNavigatorKey.currentState!.pushAndRemoveUntil(
    _createNewRoute(route, _getControllerById(controllerId)),
    (route) => false,
  );
}