toAndClearAll method

void toAndClearAll(
  1. String routeName, {
  2. Map<String, dynamic>? args,
})

Navigates to the specified route and removes all other routes from the stack.

routeName is the name of the route to navigate to. args are the optional arguments to pass to the route.

Implementation

void toAndClearAll(String routeName, {Map<String, dynamic>? args}) {
  Go.withKey(this).toAndClearAll(routeName, args: args);
}