Showcase constructor
const
Showcase({
- required GlobalKey<
State< key,StatefulWidget> > - required String? description,
- required Widget child,
- String? title,
- TextAlign titleAlignment = TextAlign.start,
- TextAlign descriptionAlignment = TextAlign.start,
- ShapeBorder targetShapeBorder = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8))),
- Color overlayColor = Colors.black45,
- double overlayOpacity = 0.65,
- TextStyle? titleTextStyle,
- TextStyle? descTextStyle,
- Color tooltipBackgroundColor = Colors.white,
- Color textColor = Colors.black,
- Widget scrollLoadingWidget = const CircularProgressIndicator(valueColor: AlwaysStoppedAnimation(Colors.white)),
- bool showArrow = true,
- VoidCallback? onTargetClick,
- bool? disposeOnTap,
- Duration movingAnimationDuration = const Duration(milliseconds: 2000),
- bool? disableMovingAnimation,
- bool? disableScaleAnimation,
- EdgeInsets tooltipPadding = const EdgeInsets.symmetric(vertical: 8, horizontal: 8),
- VoidCallback? onToolTipClick,
- EdgeInsets targetPadding = EdgeInsets.zero,
- double? blurValue,
- BorderRadius? targetBorderRadius,
- VoidCallback? onTargetLongPress,
- VoidCallback? onTargetDoubleTap,
- BorderRadius? tooltipBorderRadius,
- bool disableDefaultTargetGestures = false,
- Duration scaleAnimationDuration = const Duration(milliseconds: 300),
- Curve scaleAnimationCurve = Curves.easeIn,
- Alignment? scaleAnimationAlignment,
- TooltipPosition? tooltipPosition,
- EdgeInsets? titlePadding,
- EdgeInsets? descriptionPadding,
- TextDirection? titleTextDirection,
- TextDirection? descriptionTextDirection,
- VoidCallback? onBarrierClick,
Implementation
const Showcase({
required this.key,
required this.description,
required this.child,
this.title,
this.titleAlignment = TextAlign.start,
this.descriptionAlignment = TextAlign.start,
this.targetShapeBorder = const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(8)),
),
this.overlayColor = Colors.black45,
this.overlayOpacity = 0.65,
this.titleTextStyle,
this.descTextStyle,
this.tooltipBackgroundColor = Colors.white,
this.textColor = Colors.black,
this.scrollLoadingWidget = const CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation(Colors.white),
),
this.showArrow = true,
this.onTargetClick,
this.disposeOnTap,
this.movingAnimationDuration = const Duration(milliseconds: 2000),
this.disableMovingAnimation,
this.disableScaleAnimation,
this.tooltipPadding =
const EdgeInsets.symmetric(vertical: 8, horizontal: 8),
this.onToolTipClick,
this.targetPadding = EdgeInsets.zero,
this.blurValue,
this.targetBorderRadius,
this.onTargetLongPress,
this.onTargetDoubleTap,
this.tooltipBorderRadius,
this.disableDefaultTargetGestures = false,
this.scaleAnimationDuration = const Duration(milliseconds: 300),
this.scaleAnimationCurve = Curves.easeIn,
this.scaleAnimationAlignment,
this.tooltipPosition,
this.titlePadding,
this.descriptionPadding,
this.titleTextDirection,
this.descriptionTextDirection,
this.onBarrierClick,
}) : height = null,
width = null,
container = null,
assert(overlayOpacity >= 0.0 && overlayOpacity <= 1.0,
"overlay opacity must be between 0 and 1."),
assert(onTargetClick == null || disposeOnTap != null,
"disposeOnTap is required if you're using onTargetClick"),
assert(disposeOnTap == null || onTargetClick != null,
"onTargetClick is required if you're using disposeOnTap");