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< targetKey, List<StatefulWidget> >GlobalKey< ? extraTargetKeys, String? description, Widget? descriptionWidget, bool showNext = true, bool showSkip = true, OnboardingTooltipPosition position = OnboardingTooltipPosition.auto, Map<State< >StatefulWidget> >GlobalKey< ? keyPositions, Map<State< , OnboardingTooltipPosition>StatefulWidget> >GlobalKey< ? maxHeights, Map<State< , double>StatefulWidget> >GlobalKey< ? customWidths, Map<State< , double>StatefulWidget> >GlobalKey< ? borderRadii, double? spotlightHorizontalPadding, double tooltipVerticalOffset = 0, Map<State< , BorderRadius>StatefulWidget> >GlobalKey< ? targetClickables, List<State< , bool>StatefulWidget> >GlobalKey< ? arrowAnchorKeys, List<State< >StatefulWidget> >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< , BorderRadius>StatefulWidget> > -
final
-
customWidths
→ Map<
GlobalKey< ?State< , double>StatefulWidget> > -
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< , OnboardingTooltipPosition>StatefulWidget> > -
final
-
maxHeights
→ Map<
GlobalKey< ?State< , double>StatefulWidget> > -
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< , bool>StatefulWidget> > -
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< key) → boolStatefulWidget> > -
Returns whether the given target key should allow touch-through.
Defaults to
truewhen 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