when<R> method

  1. @override
R when<R>({
  1. required R some(
    1. T
    ),
  2. required R none(),
})
override

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();