set method Null safety
- T value,
- {bool notifyChange = true}
Updates the property value. Notifies any listeners to the change
Returns the updated value
Implementation
T set(T value, {bool notifyChange = true}) {
final previousValue = _value;
_value = value;
if (notifyChange && previousValue != value) {
_viewModel.notifyChanges([
EmpireStateChanged(value, previousValue, propertyName: propertyName)
]);
}
return _value;
}