Skip to content

Commit

Permalink
fix: hide tooltip doesn't work when tap arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
robbysoerya committed Sep 4, 2024
1 parent b637f1f commit 6885752
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/src/super_tooltip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ class _SuperTooltipState extends State<SuperTooltip>
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,
Expand Down Expand Up @@ -389,6 +389,7 @@ class _SuperTooltipState extends State<SuperTooltip>
Material(
color: Colors.transparent,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (widget.hideTooltipOnTap)
_superTooltipController!.hideTooltip();
Expand Down

0 comments on commit 6885752

Please sign in to comment.