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. bool showCloseButton = false,
  9. CloseButtonType closeButtonType = CloseButtonType.inside,
  10. Color? closeButtonColor,
  11. double? closeButtonSize,
  12. bool? showBarrier,
  13. Color? barrierColor,
  14. bool snapsFarAwayVertically = false,
  15. bool snapsFarAwayHorizontally = false,
  16. bool? hasShadow,
  17. Color? shadowColor,
  18. double? shadowBlurRadius,
  19. double? shadowSpreadRadius,
  20. Offset? shadowOffset,
  21. double? top,
  22. double? right,
  23. double? bottom,
  24. double? left,
  25. double minimumOutsideMargin = 20.0,
  26. double verticalOffset = 0.0,
  27. double elevation = 0.0,
  28. Color? backgroundColor,
  29. DecorationBuilder? decorationBuilder,
  30. Widget? child,
  31. Color borderColor = Colors.black,
  32. BoxConstraints constraints = const BoxConstraints(minHeight: 0.0, maxHeight: double.infinity, minWidth: 0.0, maxWidth: double.infinity),
  33. Duration fadeInDuration = const Duration(milliseconds: 150),
  34. Duration fadeOutDuration = const Duration(milliseconds: 0),
  35. double arrowLength = 20.0,
  36. double arrowBaseWidth = 20.0,
  37. double arrowTipRadius = 0.0,
  38. double arrowTipDistance = 2.0,
  39. ClipAreaShape touchThroughAreaShape = ClipAreaShape.oval,
  40. double touchThroughAreaCornerRadius = 5.0,
  41. Rect? touchThroughArea,
  42. double borderWidth = 0.0,
  43. double borderRadius = 10.0,
  44. EdgeInsetsGeometry overlayDimensions = const EdgeInsets.all(10),
  45. EdgeInsetsGeometry bubbleDimensions = const EdgeInsets.all(10),
  46. bool hideTooltipOnTap = false,
  47. double sigmaX = 5.0,
  48. double sigmaY = 5.0,
  49. bool showDropBoxFilter = false,
  50. bool hideTooltipOnBarrierTap = true,
  51. bool toggleOnTap = false,
  52. bool showOnTap = true,
  53. List<BoxShadow>? boxShadows,
})

Implementation

SuperTooltip({
  Key? key,
  required this.content,
  this.popupDirection = TooltipDirection.down,
  this.controller,
  this.onLongPress,
  this.onShow,
  this.onHide,
  /**
   * showCloseButton
   * This will enable the closeButton
   */
  this.showCloseButton = false,
  this.closeButtonType = CloseButtonType.inside,
  this.closeButtonColor,
  this.closeButtonSize,
  this.showBarrier,
  this.barrierColor,
  this.snapsFarAwayVertically = false,
  this.snapsFarAwayHorizontally = false,
  this.hasShadow,
  this.shadowColor,
  this.shadowBlurRadius,
  this.shadowSpreadRadius,
  this.shadowOffset,
  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.decorationBuilder,
  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.arrowTipRadius = 0.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,
  this.hideTooltipOnBarrierTap = true,
  this.toggleOnTap = false,
  this.showOnTap = true,
  this.boxShadows,
})  : assert(showDropBoxFilter ? showBarrier ?? false : true,
          'showDropBoxFilter or showBarrier can\'t be false | null'),
      super(key: key);