onAdded method Null safety

  1. @override
void onAdded()

Implementation

@override
void onAdded() {
  super.onAdded();
  if (parent is ShapePaintContainer) {
    (parent as ShapePaintContainer).addStroke(this);
  }
}