detach method

  1. @override
void detach ()
override

Mark this node as detached.

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 first call their inherited detach method, and then detach all their children.

Implementation

@override
void detach() {
  _tap.dispose();
  _longPress.dispose();
  _offset.removeListener(markNeedsPaint);
  _showCursor.removeListener(markNeedsPaint);
  if (_listenerAttached)
    RawKeyboard.instance.removeListener(_handleKeyEvent);
  super.detach();
}