close method
dynamic
close()
关闭悬浮窗
Implementation
close() {
if (!_isShowing) return;
// 正确清理 OverlayEntry
if (_overlayEntry != null) {
try {
_overlayEntry!.remove();
_overlayEntry!.dispose();
} catch (e) {
_log.log("关闭 OverlayEntry 失败: $e");
}
_overlayEntry = null;
}
_isShowing = false;
_notifyClose();
}