onRemoved method

  1. @override
void onRemoved()
inherited

When a component has been removed from the Core Context, we clean up any dangling references left on the parent and on any other dependent component. It's important for specialization of Component to respond to override onDependencyRemoved and clean up any further stored references to that component (for example the target of a Constraint).

Implementation

@override
void onRemoved() {
  _style?.valueChanged.removeListener(styleValueChanged);
  _removeLayoutNode();
  super.onRemoved();
}