updateValue method

bool updateValue(
  1. String targetId,
  2. String propertyId,
  3. Object value
)

Updates one property, clamping bounded numeric values when necessary.

Returns false for unknown targets/properties or incompatible values.

Implementation

bool updateValue(String targetId, String propertyId, Object value) {
  final property = _property(targetId, propertyId);
  if (property == null || !property.accepts(value)) return false;
  final normalized = property.normalize(value);
  final targetValues = _values[targetId];
  if (targetValues == null) return false;
  if (targetValues[propertyId] == normalized) return true;
  targetValues[propertyId] = normalized;
  notifyListeners();
  return true;
}