trySet method

bool trySet(
  1. T newValue
)

Attempts to update the value of this node.

Returns true if the value was set, or false if the node is already disposed. Does not emit debug warnings on disposed nodes.

Implementation

bool trySet(T newValue) {
  if (_isDisposed) return false;
  set(newValue);
  return true;
}