removeRoute method

void removeRoute(
  1. Route route, {
  2. int? id,
})

Navigation.removeRoute() shortcut.

Remove a specific route from the stack

id is for when you are using nested navigation, as explained in documentation

Implementation

void removeRoute(Route<dynamic> route, {int? id}) {
  return global(id).currentState?.removeRoute(route);
}