idModal<R> method Null safety

UriTemplateCompletableAppRoute<R?, RouteParams> idModal<R>(
  1. String routePath,
  2. Widget handler(
    1. BuildContext context,
    2. RouteParams? args,
    3. [ScrollController? scroller]
    ),
  3. {String? name,
  4. TransitionType? transitionType}
)

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

Implementation

UriTemplateCompletableAppRoute<R?, RouteParams> idModal<R>(
    String routePath, Widget handler(BuildContext context, RouteParams? args, [ScrollController? scroller]),
    {String? name, TransitionType? transitionType}) {
  final route = UriTemplateCompletableAppRoute<R?, RouteParams>(
    UriTemplate(routePath),
    ((BuildContext context, RouteParams? args, _) async {
      final R? r = await CupertinoScaffold.showCupertinoModalBottomSheet<R>(
          context: context, builder: (context) => handler(context, args));
      return r;
    }),
    defaultConverter,
    name: name,
  );
  this.register(route);
  return route;
}