invoke method

  1. @override
Future<RunOutput> invoke(
  1. RunInput input, {
  2. RunnableOptions? options,
})
override

Invokes the RunnableFunction on the given input.

Implementation

@override
Future<RunOutput> invoke(
  final RunInput input, {
  final RunnableOptions? options,
}) async {
  if (_invokeFunc != null) {
    return _invokeFunc(input, options);
  } else {
    return stream(input, options: options).first;
  }
}