addDependent method Null safety

bool addDependent(
  1. Component dependent
)
inherited

Implementation

bool addDependent(Component dependent) {
  assert(artboard == dependent.artboard,
      'Components must be in the same artboard.');

  if (!_dependents.add(dependent)) {
    return false;
  }
  dependent._dependsOn.add(this);

  return true;
}