SuperTooltip constructor
SuperTooltip({
- Key? key,
- required Widget content,
- TooltipDirection popupDirection = TooltipDirection.down,
- SuperTooltipController? controller,
- void onLongPress()?,
- void onShow()?,
- void onHide()?,
- ShowCloseButton? showCloseButton,
- Color? closeButtonColor,
- double? closeButtonSize,
- bool? showBarrier,
- Color? barrierColor,
- bool snapsFarAwayVertically = false,
- bool snapsFarAwayHorizontally = false,
- bool? hasShadow,
- Color? shadowColor,
- double? shadowBlurRadius,
- double? shadowSpreadRadius,
- double? top,
- double? right,
- double? bottom,
- double? left,
- double minimumOutsideMargin = 20.0,
- double verticalOffset = 0.0,
- double elevation = 0.0,
- Color? backgroundColor,
- Decoration? decoration,
- Widget? child,
- Color borderColor = Colors.black,
- BoxConstraints constraints = const BoxConstraints(minHeight: 0.0, maxHeight: double.infinity, minWidth: 0.0, maxWidth: double.infinity),
- Duration fadeInDuration = const Duration(milliseconds: 150),
- Duration fadeOutDuration = const Duration(milliseconds: 0),
- double arrowLength = 20.0,
- double arrowBaseWidth = 20.0,
- double arrowTipDistance = 2.0,
- ClipAreaShape touchThroughAreaShape = ClipAreaShape.oval,
- double touchThroughAreaCornerRadius = 5.0,
- Rect? touchThroughArea,
- double borderWidth = 0.0,
- double borderRadius = 10.0,
- EdgeInsetsGeometry overlayDimensions = const EdgeInsets.all(10),
- EdgeInsetsGeometry bubbleDimensions = const EdgeInsets.all(10),
- bool hideTooltipOnTap = false,
- double sigmaX = 5.0,
- double sigmaY = 5.0,
- bool showDropBoxFilter = false,
Implementation
SuperTooltip({
Key? key,
required this.content,
this.popupDirection = TooltipDirection.down,
this.controller,
this.onLongPress,
this.onShow,
this.onHide,
this.showCloseButton,
this.closeButtonColor,
this.closeButtonSize,
this.showBarrier,
this.barrierColor,
this.snapsFarAwayVertically = false,
this.snapsFarAwayHorizontally = false,
this.hasShadow,
this.shadowColor,
this.shadowBlurRadius,
this.shadowSpreadRadius,
this.top,
this.right,
this.bottom,
this.left,
// TD: Make edgeinsets instead
this.minimumOutsideMargin = 20.0,
this.verticalOffset = 0.0,
this.elevation = 0.0,
// TD: The native flutter tooltip uses verticalOffset
// to space the tooltip from the child. But we'll likely
// need just offset, since it's 4 way directional
// this.verticalOffset = 24.0,
this.backgroundColor,
//
//
//
this.decoration,
this.child,
this.borderColor = Colors.black,
this.constraints = const BoxConstraints(
minHeight: 0.0,
maxHeight: double.infinity,
minWidth: 0.0,
maxWidth: double.infinity,
),
this.fadeInDuration = const Duration(milliseconds: 150),
this.fadeOutDuration = const Duration(milliseconds: 0),
this.arrowLength = 20.0,
this.arrowBaseWidth = 20.0,
this.arrowTipDistance = 2.0,
this.touchThroughAreaShape = ClipAreaShape.oval,
this.touchThroughAreaCornerRadius = 5.0,
this.touchThroughArea,
this.borderWidth = 0.0,
this.borderRadius = 10.0,
this.overlayDimensions = const EdgeInsets.all(10),
this.bubbleDimensions = const EdgeInsets.all(10),
this.hideTooltipOnTap = false,
this.sigmaX = 5.0,
this.sigmaY = 5.0,
this.showDropBoxFilter = false,
}) : assert(showDropBoxFilter ? showBarrier ?? false : true),
super(key: key);