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.

Constructors

TourStep({required GlobalKey<State<StatefulWidget>> key, required String title, required String description, Color backgroundColor = Colors.white, Duration duration = const Duration(seconds: 4), String? buttonLabel, 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})
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
final
buttonLabel → String?
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 not interactive)
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
progressStyle → ProgressIndicatorStyle
Style of progress indicator to display
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
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
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