TourStep class
Represents a single step in the onboarding tour.
Each step defines which widget to highlight, what content to show in the tooltip, and how the step should behave and appear.
When key is null the step has no target widget. The tooltip will be
positioned based on preferredPosition (defaults to TooltipPosition.center
when key is null) and no spotlight overlay is drawn.
Constructors
-
TourStep({GlobalKey<
State< ? key, required String title, required String description, Color? backgroundColor, Duration? duration, String? buttonLabel, String? previousButtonLabel, String? skipButtonLabel, bool isLast = false, StepAnimation animation = StepAnimation.fadeSlideUp, HighlightShape highlightShape = HighlightShape.rounded, bool showPulse = false, Widget? customContent, bool showProgress = true, ProgressIndicatorStyle progressStyle = ProgressIndicatorStyle.dots, bool showPreviousButton = true, bool showSkipButton = true, double spotlightPadding = 8.0, double spotlightBorderRadius = 12.0, bool allowTargetTap = false, TooltipPosition preferredPosition = TooltipPosition.auto, TextStyle? titleStyle, TextStyle? descriptionStyle, IconData? icon, Color? iconColor, VoidCallback? onDisplay, bool showCloseButton = false})StatefulWidget> > -
const
Properties
- allowTargetTap → bool
-
Whether tapping the highlighted widget should advance to next step
final
- animation → StepAnimation
-
Animation type for the tooltip appearance
final
- backgroundColor → Color?
-
Background color of the tooltip card. If null, uses primary color.
final
-
Custom label for the primary button (defaults to "Next" or "Done")
final
- customContent → Widget?
-
Custom widget to display in the tooltip (replaces title/description if set)
final
- description → String
-
Description text displayed in the tooltip body
final
- descriptionStyle → TextStyle?
-
Text style for the description
final
- duration → Duration?
-
How long to show this step before auto-advancing
If null, wait for user interaction (default)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highlightShape → HighlightShape
-
Shape of the spotlight highlight around the target widget
final
- icon → IconData?
-
Custom icon to show before the title
final
- iconColor → Color?
-
Color of the icon
final
- isLast → bool
-
Whether this is the last step in the tour
final
-
key
→ GlobalKey<
State< ?StatefulWidget> > -
The GlobalKey of the widget to highlight.
final
- onDisplay → VoidCallback?
-
Callback fired when this step is displayed.
Useful for feature discovery - mark steps as "seen" by the user.
final
- preferredPosition → TooltipPosition
-
Preferred position for the tooltip relative to the target
final
- previousButtonLabel → String?
-
Custom label for the previous button
final
- progressStyle → ProgressIndicatorStyle
-
Style of progress indicator to display
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showCloseButton → bool
-
Whether to show a close button in the title area
final
- showPreviousButton → bool
-
Whether to show a "Previous" button (for going back)
final
- showProgress → bool
-
Whether to show step progress indicator
final
- showPulse → bool
-
Whether to show a pulsing animation around the highlighted widget
final
- showSkipButton → bool
-
Whether to show a "Skip" button to skip the entire tour
final
- skipButtonLabel → String?
-
Custom label for the skip button
final
- spotlightBorderRadius → double
-
Border radius for the spotlight (only for rounded/rectangle shapes)
final
- spotlightPadding → double
-
Custom padding around the spotlight cutout
final
- title → String
-
Title text displayed in the tooltip header
final
- titleStyle → TextStyle?
-
Text style for the title
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