value property

dynamic get value

Getter of the value.

Implementation

get value {
  if (_buildingElement.isNotEmpty) {
    _addAspects();
  }

  /// WET: getter of value
  if (_value is! Function) {
    return _value;
  }
  // This is a computed mediator variable.
  final fn = _value as Function;
  final res = fn();
  return res;
}
set value (dynamic newValue)

Setter of the value. If the newValue != _value, then rebuild widgets according to the aspects.

Implementation

set value(newValue) {
  if (_value != newValue) {
    _value = newValue;
    Subscriber.setToRebuild(aspects);
  }
}