OnboardingStep class

Represents a single step in the onboarding flow.

Each step highlights one or more target widgets with a spotlight effect and displays a tooltip with information for the user.

Constructors

OnboardingStep({required GlobalKey<State<StatefulWidget>> targetKey, List<GlobalKey<State<StatefulWidget>>>? extraTargetKeys, String? description, Widget? descriptionWidget, bool showNext = true, bool showSkip = true, OnboardingTooltipPosition position = OnboardingTooltipPosition.auto, Map<GlobalKey<State<StatefulWidget>>, OnboardingTooltipPosition>? keyPositions, Map<GlobalKey<State<StatefulWidget>>, double>? maxHeights, Map<GlobalKey<State<StatefulWidget>>, double>? customWidths, Map<GlobalKey<State<StatefulWidget>>, BorderRadius>? borderRadii, double? spotlightHorizontalPadding, double tooltipVerticalOffset = 0, Map<GlobalKey<State<StatefulWidget>>, bool>? targetClickables, List<GlobalKey<State<StatefulWidget>>>? arrowAnchorKeys, List<ArrowPosition>? arrowPositions})
Creates an onboarding step with the given configuration.
const

Properties

allTargetKeys List<GlobalKey<State<StatefulWidget>>>
Returns all target keys for this step (primary + extras).
no setter
arrowAnchorKeys List<GlobalKey<State<StatefulWidget>>>?
Optional list matching arrowPositions; when provided, each arrow will be horizontally aligned to the center of the corresponding key's widget.
final
arrowPositions List<ArrowPosition>?
final
borderRadii Map<GlobalKey<State<StatefulWidget>>, BorderRadius>?
final
customWidths Map<GlobalKey<State<StatefulWidget>>, double>?
final
description String?
Text description to display in the tooltip.
final
descriptionWidget Widget?
Custom widget to display in the tooltip instead of description.
final
extraTargetKeys List<GlobalKey<State<StatefulWidget>>>?
Additional widgets to highlight alongside the primary target.
final
hashCode int
The hash code for this object.
no setterinherited
keyPositions Map<GlobalKey<State<StatefulWidget>>, OnboardingTooltipPosition>?
final
maxHeights Map<GlobalKey<State<StatefulWidget>>, double>?
final
position OnboardingTooltipPosition
Where the tooltip should appear relative to the target.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showNext bool
Whether to show the "Next" button in the tooltip.
final
showSkip bool
Whether to show the "Skip" button in the tooltip.
final
spotlightHorizontalPadding double?
Optional horizontal padding applied to spotlight targets for this step. When null, controller-level default is used.
final
targetClickables Map<GlobalKey<State<StatefulWidget>>, bool>?
Controls whether touches on each target area pass through the overlay. When omitted or when a key is absent in the map, the target is clickable (passes through).
final
targetKey GlobalKey<State<StatefulWidget>>
The primary widget to highlight in this step.
final
tooltipVerticalOffset double
Extra vertical offset applied to the tooltip relative to the target when positioned above/below/auto (positive values push it further away).
final

Methods

isTargetClickable(GlobalKey<State<StatefulWidget>> key) bool
Returns whether the given target key should allow touch-through. Defaults to true when not specified.
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