HintStep class

A single tour step — data, not a widget.

Two content paths: zero-config (title/description, rendered by the default tooltip from HintTheme) and custom (tooltipBuilder, the full-customization ladder). tooltipBuilder is the only widget-typed slot in the contract — a deliberate exception to allow fully replacing a tooltip.

Annotations

Constructors

HintStep({required String targetId, List<String> moreTargets = const [], List<HintTooltip> moreTooltips = const [], String? title, String? description, TooltipPosition position = TooltipPosition.auto, Duration? waitTimeout, bool showSkip = true, bool tapOnTarget = true, bool tapOnOverlay = true, void onTapTarget(HintTooltipContext ctx, TapDownDetails details)?, void onTapOverlay(HintTooltipContext ctx, TapDownDetails details)?, Widget tooltipBuilder(BuildContext context, HintStep step, HintTooltipContext ctx)?})
const

Properties

description String?
final
hashCode int
The hash code for this object.
no setterinherited
moreTargets List<String>
Additional targets spotlighted together with targetId (multi-target step: several elements highlighted at once, one tooltip anchored to the primary targetId). The step enters the active phase only when ALL of targetIds are mounted; a scrim hole is cut over each of them.
final
moreTooltips List<HintTooltip>
Additional tooltips (multi-content): placed around the primary target alongside the primary tooltip, each on its own side. The engine guarantees they do not overlap each other or the spotlighted targets (keep-in-safe-area applies to every slot).
final
onTapOverlay → void Function(HintTooltipContext ctx, TapDownDetails details)?
Tap on the scrim (outside any target): replaces the default tapOnOverlay behavior.
final
onTapTarget → void Function(HintTooltipContext ctx, TapDownDetails details)?
Tap on a spotlighted target: replaces the default tapOnTarget behavior. Receives the step context (actions + position in the tour) and the tap details (position — for analytics / micro-interactions).
final
position TooltipPosition
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showSkip bool
Whether the default tooltip shows a "Skip" button on this step. Ignored on the last step of a tour (and on a single-step tour/hint): the tour is about to end anyway — "Done" does the same, so a "Skip" next to it would be redundant. Shown on intermediate steps only, and only when this flag is true.
final
tapOnOverlay bool
Whether a tap on the scrim (outside any target) advances the tour (when onTapOverlay is not set).
final
tapOnTarget bool
Whether a tap on a spotlighted target advances the tour (when onTapTarget is not set). Both taps default to "next" — the same behavior as before region distinction; set false to require an explicit button/callback.
final
targetId String
Key in the target registry — not a GlobalKey.
final
targetIds List<String>
All target ids of the step: the primary targetId + moreTargets.
no setter
title String?
Zero-config title/description; ignored when tooltipBuilder is set.
final
tooltipBuilder Widget Function(BuildContext context, HintStep step, HintTooltipContext ctx)?
Fully custom tooltip. Receives the step itself (styling by targetId) and a HintTooltipContext — actions for buttons plus the position in the tour (index/count, "is last step").
final
waitTimeout Duration?
Wait-for-target timeout for this step; null — inherits HintTour.stepTimeout.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveTimeout(Duration fallback) Duration
The step's timeout, honoring inheritance.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited