onUnknownRoute property

RouteFactory? onUnknownRoute

Called when onGenerateRoute also fails to generate a route.

This callback is typically used for error handling. For example, this callback might always generate a "not found" page that describes the route that wasn't found.

The default implementation pushes a route that displays an ugly error message.


final RouteFactory? onUnknownRoute;