CoachStep class
A single step in a showcase coach tour.
Each step represents one highlight in the guided tour, pointing to a specific widget via a GlobalKey and displaying instructional content.
Example
CoachStep(
targetKey: myButtonKey,
title: 'Action Button',
description: [
'Tap this button to perform an action.',
'You can undo this action later.',
],
showIf: isFeatureEnabled,
)
See also:
- ShowcaseCoach for displaying the tour
- ShowcaseCoachConfig for customizing appearance
Constructors
-
CoachStep({required GlobalKey<
State< targetKey, required String title, required List<StatefulWidget> >String> description, bool shouldShow()?, bool showIf = true, VoidCallback? onNext, VoidCallback? onSkip, String? nextButtonText, String? skipButtonText, bool showSkipButton = true}) -
Creates a new showcase coach step.
const
Properties
-
description
→ List<
String> -
The description text displayed in the tooltip card.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isVisible → bool
-
Checks if this step should be displayed based on its conditions.
no setter
- nextButtonText → String?
-
Custom text for the "Next" button.
final
- onNext → VoidCallback?
-
Custom action to execute when "Next" button is pressed.
final
- onSkip → VoidCallback?
-
Custom action to execute when "Skip" button is pressed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldShow → bool Function()?
-
Optional callback to determine if this step should be shown.
final
- showIf → bool
-
Simple boolean flag to control if this step should be shown.
final
- showSkipButton → bool
-
Whether to show the skip button for this step.
final
- skipButtonText → String?
-
Custom text for the "Skip" button.
final
-
targetKey
→ GlobalKey<
State< StatefulWidget> > -
The GlobalKey attached to the widget to highlight.
final
- title → String
-
The title displayed in the tooltip card.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited