close method

void close()

Closes and removes the modal.

Implementation

void close() {
  _detachKeys?.call();
  _detachKeys = null;
  if (_overlay.parentNode != null) _overlay.remove();
}