childAdded method Null safety

  1. @override
void childAdded(
  1. Component child
)
inherited

Implementation

@override
void childAdded(Component child) {
  super.childAdded(child);
  switch (child.coreType) {
    case DrawRulesBase.typeKey:
      _drawRules = child as DrawRules;

      break;
    case ClippingShapeBase.typeKey:
      _clippingShapes.add(child as ClippingShape);
      addDirt(ComponentDirt.clip, recurse: true);

      break;
    case TransformConstraintBase.typeKey:
    case IKConstraintBase.typeKey:
    case DistanceConstraintBase.typeKey:
    case TranslationConstraintBase.typeKey:
    case RotationConstraintBase.typeKey:
    case ScaleConstraintBase.typeKey:
      _constraints.add(child as Constraint);
      break;
  }
}