Notify that the field name
of this object has been changed.
The oldValue
and newValue
are also recorded. If the two values are
equal, no change will be recorded.
For convenience this returns newValue
. This makes it easy to use in a
setter:
var _myField;
@reflectable get myField => _myField;
@reflectable set myField(value) {
_myField = notifyPropertyChange(#myField, _myField, value);
}
notifyPropertyChange(Symbol field, Object oldValue, Object newValue)
=> notifyPropertyChangeHelper(this, field, oldValue, newValue);