pop method

Future<void> pop({
  1. Map<String, String> pathParameters = const {},
  2. Map<String, String> queryParameters = const {},
  3. String? hash,
  4. Map<String, String> newHistoryState = const {},
})

Starts a pop cycle

Pop cycle:

  1. onPop is called in all VNavigationGuards
  2. onPop is called in all VRouteElements of the current route
  3. onPop is called in VRouter

In any of the above steps, we can use vRedirector if you want to redirect or stop the navigation

Implementation

Future<void> pop({
  Map<String, String> pathParameters = const {},
  Map<String, String> queryParameters = const {},
  String? hash,
  Map<String, String> newHistoryState = const {},
}) async {
  navigatorKey.currentState!.pop(
    VPopData(
      elementToPop: _vRoute.vRouteElementNode.getVRouteElementToPop(),
      pathParameters: pathParameters,
      queryParameters: queryParameters,
      hash: hash,
      newHistoryState: newHistoryState,
    ),
  );
  return;
}