convertBoth<S2, F2> method

Task<S2, F2> convertBoth<S2, F2>({
  1. required S2 onOk(
    1. S ok
    ),
  2. required F2 onErr(
    1. F err
    ),
})

Converts both the success and failure types of the task's result.

Implementation

Task<S2, F2> convertBoth<S2, F2>({
  required S2 Function(S ok) onOk,
  required F2 Function(F err) onErr,
}) => Task._(_task.convertBoth(onSuccess: onOk, onFailure: onErr));