diff --git a/lib/src/super_tooltip.dart b/lib/src/super_tooltip.dart index f5ecb1b..a588445 100644 --- a/lib/src/super_tooltip.dart +++ b/lib/src/super_tooltip.dart @@ -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. @@ -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), @@ -757,6 +761,16 @@ class _SuperTooltipState extends State 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( @@ -831,6 +845,16 @@ class _SuperTooltipState extends State _superTooltipController!.hideTooltip(); } }, + onVerticalDragUpdate: (_) { + if (widget.hideTooltipOnScroll) { + _superTooltipController!.hideTooltip(); + } + }, + onHorizontalDragUpdate: (_) { + if (widget.hideTooltipOnScroll) { + _superTooltipController!.hideTooltip(); + } + }, child: Container( key: SuperTooltip.bubbleKey, margin: SuperUtils.getTooltipMargin( diff --git a/makedoc.bat b/makedoc.bat deleted file mode 100644 index 053587e..0000000 --- a/makedoc.bat +++ /dev/null @@ -1 +0,0 @@ -dartdoc --exclude 'dart:async,dart:collection,dart:convert,dart:core,dart:developer,dart:ffi,dart:html,dart:io,dart:isolate,dart:js,dart:js_util,dart:math,dart:typed_data,dart:ui' \ No newline at end of file