then<S2> method

Task<S2, F> then<S2>(
  1. FutureOr<Res<S2, F>> run(
    1. S ok
    )
)

Chains another asynchronous function to be executed if the current task succeeds.

Implementation

Task<S2, F> then<S2>(FutureOr<Res<S2, F>> Function(S ok) run) =>
    Task._(_task.then(run as FutureOr<Result<S2, F>> Function(S)));