FlowInstruction<C extends Cell, I extends Pulse, O extends Pulse>.future constructor

const FlowInstruction<C extends Cell, I extends Pulse, O extends Pulse>.future(
  1. O? instruction(
    1. I pulse, {
    2. C? cell,
    3. void future({
      1. required Pulse? result,
      2. required dynamic token,
      })?,
    4. dynamic token,
    5. dynamic user,
    }), {
  2. dynamic user,
})

Creates an asynchronous FlowInstruction.

The instruction closure is used for operations that involve Futures or deferred execution. It receives a future callback to register async results and a token to track specific stimuli.

Implementation

const factory FlowInstruction.future(
    O? Function(I pulse,
            {C? cell,
            dynamic user,
            void Function({required Pulse? result, required dynamic token})?
                future,
            dynamic token})
        instruction,
    {dynamic user}) = _FlowInstruction<C, I, O>.future;