Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions lib/src/super_tooltip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ class SuperTooltip extends StatefulWidget {
/// Defaults to `false`.
final bool clickThrough;

//scroll dismiss
final bool hideTooltipOnScroll;

/// Whether to automatically show the tooltip when the mouse pointer hovers over the [child].
///
/// This feature utilizes [MouseRegion] and is primarily intended for Web and Desktop platforms.
Expand Down Expand Up @@ -434,6 +437,7 @@ class SuperTooltip extends StatefulWidget {
this.clickThrough = false,
this.showOnHover = false,
this.hideOnHoverExit = false,
this.hideTooltipOnScroll = false,
this.waitDuration = Duration.zero,
this.showDuration,
this.exitDuration = const Duration(milliseconds: 100),
Expand Down Expand Up @@ -757,6 +761,16 @@ class _SuperTooltipState extends State<SuperTooltip>
onTap: widget.hideTooltipOnBarrierTap
? _superTooltipController!.hideTooltip
: null,
onVerticalDragUpdate: (_) {
if (widget.hideTooltipOnScroll) {
_superTooltipController!.hideTooltip();
}
},
onHorizontalDragUpdate: (_) {
if (widget.hideTooltipOnScroll) {
_superTooltipController!.hideTooltip();
}
},
child: Container(
key: SuperTooltip.barrierKey,
decoration: ShapeDecoration(
Expand Down Expand Up @@ -831,6 +845,16 @@ class _SuperTooltipState extends State<SuperTooltip>
_superTooltipController!.hideTooltip();
}
},
onVerticalDragUpdate: (_) {
if (widget.hideTooltipOnScroll) {
_superTooltipController!.hideTooltip();
}
},
onHorizontalDragUpdate: (_) {
if (widget.hideTooltipOnScroll) {
_superTooltipController!.hideTooltip();
}
},
child: Container(
key: SuperTooltip.bubbleKey,
margin: SuperUtils.getTooltipMargin(
Expand Down
1 change: 0 additions & 1 deletion makedoc.bat

This file was deleted.