detach method

  1. @override
void detach()
override

Mark this render object as detached from its PipelineOwner.

Typically called only from the parent's detach, and by the owner to mark the root of a tree as detached.

Subclasses with children should override this method to detach all their children after calling the inherited method, as in super.detach().

Implementation

@override
void detach() {
  super.detach();
  for (final child in _children) {
    child.detach();
  }
  cursorCont.floatingCursorTextPosition.removeListener(_onFloatingCursorChange);
  if (_attachedToCursorController) {
    cursorCont.removeListener(markNeedsLayout);
    cursorCont.color.removeListener(safeMarkNeedsPaint);
    _attachedToCursorController = false;
  }
}