idPage<R, E> method Null safety

UriTemplateAppPageRoute<R, IdArgs<E>> idPage<R, E>(
  1. String routePath,
  2. Widget handler(
    1. BuildContext context,
    2. IdArgs<E>? args
    ),
  3. {String? name,
  4. TransitionType? transitionType}
)

Creates an AppPageRoute definition whose arguments are Map<String, dynamic>

Implementation

UriTemplateAppPageRoute<R, IdArgs<E>> idPage<R, E>(String routePath, Widget handler(BuildContext context, IdArgs<E>? args),
    {String? name, TransitionType? transitionType}) {
  final route = UriTemplateAppPageRoute<R, IdArgs<E>>(
    UriTemplate(routePath),
    (context, args) => handler(context, args),
    (args) => IdArgs<E>.of(args),
    name: name,
    transitionType: transitionType,
  );
  this.register(route);
  return route;
}