Skip to content

Commit

Permalink
Merge pull request #121 from robbysoerya/fix/hide_tooltip_on_tap_does…
Browse files Browse the repository at this point in the history
…nt_work_when_tap_arrow

fix: hide tooltip doesn't work when tap arrow
  • Loading branch information
bensonarafat authored Sep 22, 2024
2 parents b637f1f + 6885752 commit 061bc10
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 061bc10

Please sign in to comment.