unmountRenderObject method

  1. @override
void unmountRenderObject({
  1. bool deep = false,
})
override

Unmount renderBoxModel.

Implementation

@override
void unmountRenderObject({ bool deep = false }) {
  if (renderBoxModel == null) return;

  willDetachRenderer();

  // Dispose all renderObject when deep.
  if (deep) {
    for (Node child in childNodes) {
      child.unmountRenderObject(deep: true);
    }
  }

  didDetachRenderer();
  renderBoxModel?.dispose();
  renderBoxModel = null;
}