removeRoute method
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(String name, {String? id}) {
return searchDelegate(id).removeRoute(name);
}