addDirt method

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);
  _dependencyHelper.onComponentDirty(this);

  if (!recurse) {
    return true;
  }

  _dependencyHelper.addDirt(value, recurse: recurse);
  return true;
}