SuperTooltip constructor

SuperTooltip({
  1. Key? key,
  2. required Widget content,
  3. TooltipDirection popupDirection = TooltipDirection.down,
  4. SuperTooltipController? controller,
  5. void onLongPress()?,
  6. void onShow()?,
  7. void onHide()?,
  8. ShowCloseButton? showCloseButton,
  9. Color? closeButtonColor,
  10. double? closeButtonSize,
  11. bool? showBarrier,
  12. Color? barrierColor,
  13. bool snapsFarAwayVertically = false,
  14. bool snapsFarAwayHorizontally = false,
  15. bool? hasShadow,
  16. Color? shadowColor,
  17. double? shadowBlurRadius,
  18. double? shadowSpreadRadius,
  19. double? top,
  20. double? right,
  21. double? bottom,
  22. double? left,
  23. double minimumOutsideMargin = 20.0,
  24. double verticalOffset = 0.0,
  25. double elevation = 0.0,
  26. Color? backgroundColor,
  27. Decoration? decoration,
  28. Widget? child,
  29. Color borderColor = Colors.black,
  30. BoxConstraints constraints = const BoxConstraints(minHeight: 0.0, maxHeight: double.infinity, minWidth: 0.0, maxWidth: double.infinity),
  31. Duration fadeInDuration = const Duration(milliseconds: 150),
  32. Duration fadeOutDuration = const Duration(milliseconds: 0),
  33. double arrowLength = 20.0,
  34. double arrowBaseWidth = 20.0,
  35. double arrowTipDistance = 2.0,
  36. ClipAreaShape touchThroughAreaShape = ClipAreaShape.oval,
  37. double touchThroughAreaCornerRadius = 5.0,
  38. Rect? touchThroughArea,
  39. double borderWidth = 0.0,
  40. double borderRadius = 10.0,
  41. EdgeInsetsGeometry overlayDimensions = const EdgeInsets.all(10),
  42. EdgeInsetsGeometry bubbleDimensions = const EdgeInsets.all(10),
  43. bool hideTooltipOnTap = false,
  44. double sigmaX = 5.0,
  45. double sigmaY = 5.0,
  46. 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);