childRemoved method Null safety
- Component child
inherited
Implementation
@override
void childRemoved(Component child) {
super.childRemoved(child);
switch (child.coreType) {
case DrawRulesBase.typeKey:
if (_drawRules == child as DrawRules) {
_drawRules = null;
}
break;
case ClippingShapeBase.typeKey:
if (_clippingShapes.isNotEmpty) {
_clippingShapes.remove(child as ClippingShape);
addDirt(ComponentDirt.clip, recurse: true);
}
break;
case IKConstraintBase.typeKey:
case DistanceConstraintBase.typeKey:
_constraints.remove(child as Constraint);
break;
}
}