dispose method

  1. @override
void dispose()
override

Release any resources held by this node.

Implementation

@override
void dispose() async {
  renderStyle.detach();
  style.dispose();
  attributes.clear();
  disposeScrollable();
  _attributeProperties.clear();
  flutterWidget = null;
  flutterWidgetElement = null;
  ownerDocument.inactiveRenderObjects.add(renderer);
  ownerDocument.clearElementStyleDirty(this);
  _beforeElement?.dispose();
  _beforeElement = null;
  _afterElement?.dispose();
  _afterElement = null;
  super.dispose();
}