fromRouter<RunInput extends Object, RunOutput extends Object> static method
Runnable<RunInput, RunnableOptions, RunOutput>
fromRouter<RunInput extends Object, RunOutput extends Object>(
- FutureOr<
Runnable< router(RunInput, RunnableOptions, RunOutput> >- RunInput input,
- RunnableOptions? options
Creates a RunnableRouter from a Dart function.
A RunnableRouter takes the input it receives and routes it to the runnable
returned by the router
function.
router
- the function that will be called to determine the runnable to use.
Implementation
static Runnable<RunInput, RunnableOptions, RunOutput>
fromRouter<RunInput extends Object, RunOutput extends Object>(
final FutureOr<Runnable<RunInput, RunnableOptions, RunOutput>> Function(
RunInput input,
RunnableOptions? options,
) router,
) {
return RunnableRouter<RunInput, RunOutput>(router);
}