showTutorial method
void
showTutorial({
- bool? hideSkip,
- String? skipText,
- TextStyle? skipTextStyle,
- AlignmentGeometry? skipPosition,
- Color? bgColor,
- double? opacity,
- double? padding,
- List? keyList,
- double? radius,
- dynamic clickTarget(
- TargetFocus
- dynamic clickOverlay(
- TargetFocus
- dynamic clickTargetWithTapPosition(
- TargetFocus,
- TapDownDetails
- dynamic onSkip()?,
- dynamic onFinish()?,
Implementation
void showTutorial({
bool? hideSkip,
String? skipText,
TextStyle? skipTextStyle,
AlignmentGeometry? skipPosition,
Color? bgColor,
double? opacity,
double? padding,
List? keyList,
double? radius,
Function(TargetFocus)? clickTarget,
Function(TargetFocus)? clickOverlay,
Function(TargetFocus, TapDownDetails)? clickTargetWithTapPosition,
Function()? onSkip,
Function()? onFinish,
}) {
TutorialCoachMark(
targets: _createTargets(
keyList: keyList ?? [],
radius: radius,
skipPosition: skipPosition,
),
colorShadow: bgColor ?? Colors.red,
pulseEnable: false,
skipWidget: Text(
skipText ?? "跳过",
style: skipTextStyle,
),
hideSkip: hideSkip ?? false,
paddingFocus: padding ?? 0,
opacityShadow: opacity ?? 0.5,
imageFilter: ImageFilter.blur(sigmaX: 8, sigmaY: 8),
onFinish: () {
onFinish?.call();
},
onClickTarget: (target) {
clickTarget?.call(target);
},
onClickTargetWithTapPosition: (target, tapDetails) {
clickTargetWithTapPosition?.call(target, tapDetails);
},
onClickOverlay: (target) {
clickOverlay?.call(target);
},
onSkip: () {
onSkip?.call();
return true;
},
).show(context: context);
}