whenAsync<R> method
Asynchronously invokes either some
or none
depending on the option.
Identical to match
except that the arguments are named.
Implementation
Future<R> whenAsync<R>({
required FutureOr<R> Function(T) some,
required FutureOr<R> Function() none,
}) =>
matchAsync(some, none);