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