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