removeRoute method
void
removeRoute()
Removes the provided route from the navigator and returns true if
it is successfully removed, or false if not found.
If the route is removed successfully, it will trigger Route.didPop.
route represents the removed Route, and result
signifies the result passed as an argument to Route.didPop.
Implementation
void removeRoute() {
Router.of(this).removeRoute(this);
}