OnboardingService class

Service that manages the onboarding flow with spotlight effects and tooltips.

This service orchestrates the display of onboarding steps, each with a spotlight effect highlighting specific UI elements and tooltips providing contextual information to users.

Inheritance

Constructors

OnboardingService(SpotlightService spotlight)
Creates an OnboardingService with the given spotlight service.

Properties

currentStep OnboardingStep
Returns the current onboarding step being displayed.
no setter
currentTargetRect Rect?
The current target widget's rectangle on screen, or null if not measured.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isActive bool
Whether the onboarding flow is currently active.
no setter
isSkipSheetOpen bool
Whether the skip confirmation sheet is currently open.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spotlight SpotlightService
The spotlight service used to highlight target widgets during onboarding.
final
steps List<OnboardingStep>
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dismissSilently({bool shouldCleanSkip = true}) → void
Dismisses the onboarding without calling any callbacks.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
finish() → void
Completes the onboarding flow and calls the onFinish callback.
next() → void
Advances to the next onboarding step, or finishes if on the last step.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
showSkipConfirmation() Future<void>
skip() → void
Shows the skip confirmation sheet to the user.
start(BuildContext context, List<OnboardingStep> onboardingSteps, {void onStepChanged(int index)?, VoidCallback? onFinish, VoidCallback? onSkip, double defaultSpotlightHorizontalPadding = _kDefaultSpotlightHorizontalPadding, String? skipSheetTitle, String? skipSheetContinueButtonText, String? skipSheetSkipButtonText}) → void
Starts the onboarding flow with the given onboardingSteps.
toString() String
A string representation of this object.
inherited

Operators

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