smartSet method

void smartSet(
  1. T newValue
)

Updates the value if it differs from the current value, and notifies listeners.

Implementation

void smartSet(T newValue) {
  if (_value == newValue) return;

  hardSet(newValue);
}