function<R> method

AppRoute<R, RouteParams> function<R>(
  1. String routePath,
  2. CompletableHandler<R, RouteParams> handler, {
  3. String? name,
  4. ToRouteTitle? toRouteTitle,
})

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

Implementation

AppRoute<R, RouteParams> function<R>(
  String routePath,
  CompletableHandler<R, RouteParams> handler, {
  String? name,
  ToRouteTitle? toRouteTitle,
}) {
  final route = UriTemplateCompletableAppRoute<R, RouteParams>(
    UriTemplate(routePath),
    handler,
    (_) => RouteParams.of(_),
    name: name,
    toRouteTitle: toRouteTitle,
  );
  this.register(route);
  return route;
}