when<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult when<TResult extends Object?>(
  1. {required TResult value(
    1. String value
    ),
  2. required TResult unique(
      )}
    )
    @optionalTypeArgs, inherited

    Implementation

    @optionalTypeArgs
    TResult when<TResult extends Object?>({
      required TResult Function(String value) value,
      required TResult Function() unique,
    }) =>
        throw _privateConstructorUsedError;