willDetachRenderer method

  1. @override
  2. @mustCallSuper
void willDetachRenderer()
override

A render object previously associated with this Node will be / has been removed from the tree. The given RenderObject will be of the same type as returned by this object's createRenderer.

Implementation

@override
@mustCallSuper
void willDetachRenderer() {
  // The node detach may affect the whitespace of the nextSibling and previousSibling text node so prev and next node require layout.
  if (renderer is RenderBoxModel) {
    (renderer as RenderBoxModel).markAdjacentRenderParagraphNeedsLayout();
  }
}