unmount method

  1. @override
void unmount()
override

Removes this element from the tree.

Implementation

@override
void unmount() {
  final modal = widget as ModalOverlay;
  // Detach focus children to prevent leaks
  for (final node in modal.modalFocusNodes) {
    modal.focusNode.removeChild(node);
  }
  super.unmount();
}