childRemoved method Null safety

  1. @override
void childRemoved(
  1. 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;
  }
}