completable<R, E> method Null safety

CompletableAppRoute<R, IdArgs<E>> completable<R, E>(
  1. String routePath,
  2. MSchemaRef ref,
  3. {required CompletableHandler<R, IdArgs<E>> handler,
  4. String? name}
)

Creates a CompletableAppRoute definition.

Implementation

CompletableAppRoute<R, IdArgs<E>> completable<R, E>(
  String routePath,
  MSchemaRef ref, {
  required CompletableHandler<R, IdArgs<E>> handler,
  String? name,
}) {
  final completable = CompletableAppRoute<R, IdArgs<E>>(routePath, handler, (_) => IdArgs.of(_), name: name);
  this.register(completable);
  return completable;
}