CustomShowcase constructor
const
CustomShowcase({
- required GlobalKey<
State< key,StatefulWidget> > - required Widget child,
- required int currentWidgetId,
- required Widget buttonWidget,
- bool? isLast = false,
- String? title,
- ButtonStyle? buttonStyle,
- TextAlign titleAlignment = TextAlign.start,
- required String? description,
- int totalWidgetsID = 5,
- TextAlign descriptionAlignment = TextAlign.start,
- ShapeBorder targetShapeBorder = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8))),
- Color overlayColor = Colors.black45,
- double overlayOpacity = 0.75,
- 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,
- TextStyle? indctorStyle,
- 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? indctorPadding,
- EdgeInsets? titlePadding,
- EdgeInsets? descriptionPadding,
Implementation
const CustomShowcase({
required this.key,
required this.child,
required this.currentWidgetId,
required this.buttonWidget,
this.isLast = false,
this.title,
this.buttonStyle,
this.titleAlignment = TextAlign.start,
required this.description,
this.totalWidgetsID = 5,
this.descriptionAlignment = TextAlign.start,
this.targetShapeBorder = const RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(8),
),
),
this.overlayColor = Colors.black45,
this.overlayOpacity = 0.75,
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.indctorStyle,
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.indctorPadding,
this.titlePadding,
this.descriptionPadding,
}) : 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");