show method
显示 Tooltip,并在它关闭时完成返回的 Future。
Implementation
Future<void> show() {
if (_disposed) return Future<void>.value();
if (_active != null && !identical(_active, this)) _active!.dismiss();
_active = this;
_timer?.cancel();
_showCompleter ??= Completer<void>();
if (!_isVisible) {
_isVisible = true;
notifyListeners();
}
if (!isPersistent) {
_timer = Timer(MiuixTooltipDefaults.tooltipDuration, dismiss);
}
return _showCompleter!.future;
}