then<R> method

Future<R> then<R>(
  1. FutureOr<R> onValue(
    1. V value
    ), {
  2. Function? onError,
})

Chains a callback to the resolved value.

Equivalent to calling resolveAsync and then "then" on the resulting Future.

Implementation

Future<R> then<R>(FutureOr<R> Function(V value) onValue,
        {Function? onError}) =>
    resolveAsync().then(onValue, onError: onError);