addDependent method

bool addDependent(
  1. Component dependent
)
inherited

Implementation

bool addDependent(Component dependent) {
  assert(dependent != null, 'Dependent cannot be null.');
  assert(artboard == dependent.artboard,
      'Components must be in the same artboard.');
  if (!_dependents.add(dependent)) {
    return false;
  }
  dependent._dependsOn.add(this);
  return true;
}