resetStack method

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

Removes the current navigation stack and navigates to the a new stack where the first route is the one 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> resetStack(BeagleRoute route, [String? controllerId]) async {
  _history.removeLast();
  _thisNavigatorKey.currentState!.pushReplacement(_createNewRoute(route, _getControllerById(controllerId)));
}