replace method
Replaces the top-most page of the page stack with the route but treats it as the same page.
The page key will be reused. This will preserve the state and not run any page animation.
Implementation
void replace(BuildContext context) =>
throw _GoRouteDataBase.shouldBeGeneratedError;