setOrNull method

  1. @override
T? setOrNull(
  1. T value
)
override

Sets the contents of the cell to value. Returns null if the value is already set.

Implementation

@override
T? setOrNull(T value) {
  var val = _cache[this] as (T,)?;
  if (val != null) {
    return null;
  }
  _cache[this] = (value,);
  return value;
}