mapInput<RunInput extends Object, RunOutput extends Object> static method

Runnable<RunInput, RunnableOptions, RunOutput> mapInput<RunInput extends Object, RunOutput extends Object>(
  1. FutureOr<RunOutput> inputMapper(
    1. RunInput input
    )
)

Creates a RunnableMapInput from a function.

A RunnableMapInput allows you to map the input to a different value.

  • inputMapper - a function that maps RunInput to RunOutput.

Implementation

static Runnable<RunInput, RunnableOptions, RunOutput>
    mapInput<RunInput extends Object, RunOutput extends Object>(
  final FutureOr<RunOutput> Function(RunInput input) inputMapper,
) {
  return RunnableMapInput<RunInput, RunOutput>(inputMapper);
}