setProperty method

  1. @mustCallSuper
void setProperty(
  1. String key,
  2. dynamic value
)
inherited

Implementation

@mustCallSuper
void setProperty(String key, dynamic value) {
  // Each key change will emit to `setStyle`
  if (key == _STYLE_PROPERTY) {
    assert(value is Map<String, dynamic>);
    // @TODO: Consider `{ color: red }` to `{}`, need to remove invisible keys.
    (value as Map<String, dynamic>).forEach(setStyle);
  } else {
    properties[key] = value;
  }
}