From 6885752662c08e4950335809b5cbd43886279b5c Mon Sep 17 00:00:00 2001 From: Robby Surya Pratama Date: Wed, 4 Sep 2024 10:54:24 +0700 Subject: [PATCH] fix: hide tooltip doesn't work when tap arrow --- lib/src/super_tooltip.dart | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/src/super_tooltip.dart b/lib/src/super_tooltip.dart index c46463f..cf5d87b 100644 --- a/lib/src/super_tooltip.dart +++ b/lib/src/super_tooltip.dart @@ -223,13 +223,13 @@ class _SuperTooltipState extends State link: _layerLink, child: GestureDetector( onTap: () { - if (widget.toggleOnTap && _superTooltipController!.isVisible) { - _superTooltipController!.hideTooltip(); - } else { - if (widget.showOnTap) { - _superTooltipController!.showTooltip(); - } + if (widget.toggleOnTap && _superTooltipController!.isVisible) { + _superTooltipController!.hideTooltip(); + } else { + if (widget.showOnTap) { + _superTooltipController!.showTooltip(); } + } }, onLongPress: widget.onLongPress, child: widget.child, @@ -389,6 +389,7 @@ class _SuperTooltipState extends State Material( color: Colors.transparent, child: GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { if (widget.hideTooltipOnTap) _superTooltipController!.hideTooltip();