Creates a Route that is to be added to a Navigator.
The route can be configured with the provided
arguments. The provided
context is the
BuildContext of the Navigator to which the route is
Used by the restorable methods of the Navigator that add anonymous routes (e.g. NavigatorState.restorablePush). For this use case, the RestorableRouteBuilder must be static function as the Navigator will call it again during state restoration to re-create the route.
typedef RestorableRouteBuilder<T> = Route<T> Function(BuildContext context, Object? arguments);