Showcase.withWidget constructor

const Showcase.withWidget({
  1. required GlobalKey<State<StatefulWidget>> key,
  2. required double? height,
  3. required double? width,
  4. required Widget? container,
  5. required Widget child,
  6. ShapeBorder targetShapeBorder = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8))),
  7. Color overlayColor = Colors.black45,
  8. BorderRadius? targetBorderRadius,
  9. double overlayOpacity = 0.65,
  10. Widget scrollLoadingWidget = const CircularProgressIndicator(valueColor: AlwaysStoppedAnimation(Colors.white)),
  11. VoidCallback? onTargetClick,
  12. bool? disposeOnTap,
  13. Duration movingAnimationDuration = const Duration(milliseconds: 2000),
  14. bool? disableMovingAnimation,
  15. EdgeInsets targetPadding = EdgeInsets.zero,
  16. double? blurValue,
  17. VoidCallback? onTargetLongPress,
  18. VoidCallback? onTargetDoubleTap,
  19. bool disableDefaultTargetGestures = false,
  20. TooltipPosition? tooltipPosition,
  21. VoidCallback? onBarrierClick,
})

Implementation

const Showcase.withWidget({
  required this.key,
  required this.height,
  required this.width,
  required this.container,
  required this.child,
  this.targetShapeBorder = const RoundedRectangleBorder(
    borderRadius: BorderRadius.all(
      Radius.circular(8),
    ),
  ),
  this.overlayColor = Colors.black45,
  this.targetBorderRadius,
  this.overlayOpacity = 0.65,
  this.scrollLoadingWidget = const CircularProgressIndicator(
      valueColor: AlwaysStoppedAnimation(Colors.white)),
  this.onTargetClick,
  this.disposeOnTap,
  this.movingAnimationDuration = const Duration(milliseconds: 2000),
  this.disableMovingAnimation,
  this.targetPadding = EdgeInsets.zero,
  this.blurValue,
  this.onTargetLongPress,
  this.onTargetDoubleTap,
  this.disableDefaultTargetGestures = false,
  this.tooltipPosition,
  this.onBarrierClick,
})  : showArrow = false,
      onToolTipClick = null,
      scaleAnimationDuration = const Duration(milliseconds: 300),
      scaleAnimationCurve = Curves.decelerate,
      scaleAnimationAlignment = null,
      disableScaleAnimation = null,
      title = null,
      description = null,
      titleAlignment = TextAlign.start,
      descriptionAlignment = TextAlign.start,
      titleTextStyle = null,
      descTextStyle = null,
      tooltipBackgroundColor = Colors.white,
      textColor = Colors.black,
      tooltipBorderRadius = null,
      tooltipPadding = const EdgeInsets.symmetric(vertical: 8),
      titlePadding = null,
      descriptionPadding = null,
      titleTextDirection = null,
      descriptionTextDirection = null,
      assert(overlayOpacity >= 0.0 && overlayOpacity <= 1.0,
          "overlay opacity must be between 0 and 1.");