Showcase constructor

const Showcase({
  1. required GlobalKey<State<StatefulWidget>> key,
  2. required Widget child,
  3. String? title,
  4. required String? description,
  5. ShapeBorder? shapeBorder,
  6. Color overlayColor = Colors.black45,
  7. double overlayOpacity = 0.75,
  8. TextStyle? titleTextStyle,
  9. TextStyle? descTextStyle,
  10. Color showcaseBackgroundColor = Colors.white,
  11. Color textColor = Colors.black,
  12. Widget scrollLoadingWidget = const CircularProgressIndicator(valueColor: AlwaysStoppedAnimation(Colors.white)),
  13. bool showArrow = true,
  14. VoidCallback? onTargetClick,
  15. bool? disposeOnTap,
  16. Duration animationDuration = const Duration(milliseconds: 2000),
  17. bool? disableAnimation,
  18. EdgeInsets contentPadding = const EdgeInsets.symmetric(vertical: 8, horizontal: 8),
  19. VoidCallback? onToolTipClick,
  20. EdgeInsets overlayPadding = EdgeInsets.zero,
  21. double? blurValue,
  22. BorderRadius? radius,
  23. VoidCallback? onTargetLongPress,
  24. VoidCallback? onTargetDoubleTap,
  25. BorderRadius? tipBorderRadius,
})

Implementation

const Showcase({
  required this.key,
  required this.child,
  this.title,
  required this.description,
  this.shapeBorder,
  this.overlayColor = Colors.black45,
  this.overlayOpacity = 0.75,
  this.titleTextStyle,
  this.descTextStyle,
  this.showcaseBackgroundColor = Colors.white,
  this.textColor = Colors.black,
  this.scrollLoadingWidget = const CircularProgressIndicator(
      valueColor: AlwaysStoppedAnimation(Colors.white)),
  this.showArrow = true,
  this.onTargetClick,
  this.disposeOnTap,
  this.animationDuration = const Duration(milliseconds: 2000),
  this.disableAnimation,
  this.contentPadding =
      const EdgeInsets.symmetric(vertical: 8, horizontal: 8),
  this.onToolTipClick,
  this.overlayPadding = EdgeInsets.zero,
  this.blurValue,
  this.radius,
  this.onTargetLongPress,
  this.onTargetDoubleTap,
  this.tipBorderRadius,
})  : height = null,
      width = null,
      container = null,
      assert(overlayOpacity >= 0.0 && overlayOpacity <= 1.0,
          "overlay opacity must be between 0 and 1."),
      assert(
          onTargetClick == null
              ? true
              : (disposeOnTap == null ? false : true),
          "disposeOnTap is required if you're using onTargetClick"),
      assert(
          disposeOnTap == null
              ? true
              : (onTargetClick == null ? false : true),
          "onTargetClick is required if you're using disposeOnTap");