addDirt method Null safety

bool addDirt(
  1. int value,
  2. {bool recurse = false}
)
inherited

Implementation

bool addDirt(int value, {bool recurse = false}) {
  if ((dirt & value) == value) {
    // Already marked.
    return false;
  }

  // Make sure dirt is set before calling anything that can set more dirt.
  dirt |= value;

  onDirty(dirt);
  artboard?.onComponentDirty(this);

  if (!recurse) {
    return true;
  }

  for (final d in dependents) {
    d.addDirt(value, recurse: recurse);
  }
  return true;
}