set method

dynamic set(
  1. dynamic value, {
  2. bool notify = true,
})

Implementation

set(dynamic value, {bool notify = true})
{
  if (setter != null)
  {
    value = setter!(value);
  }
  value = to(value);
  if (value is Exception) return;
  if (value != _value)
  {
    _value = value;
    if (notify != false) notifyListeners();
  }
}