addDependent method
Mark dependent as a component which must update after this. Provide
via as the Component registering the dependency when it is not
dependent itself. At edit time this allows the editor to rebuild both
dependent and via when dependent has its dependencies cleared.
Implementation
bool addDependent(Component dependent, {Component? via}) {
assert(artboard == dependent.artboard,
'Components must be in the same artboard.');
if (!_dependencyHelper.addDependent(dependent)) {
return false;
}
dependent._dependsOn.add(this);
return true;
}