TutorialEngine class

Widget that renders a tutorial overlay for the current TutorialStep.

This widget composes the same visual primitives used in standalone spotlight mode: it measures the current step's TutorialStep.target and renders a TutorialBubbleOverlay, which in turn draws the dark overlay, optional arrow, halos, and a TutorialBubble for the bubble content. No separate engine-specific implementation of these visuals exists; changes to TutorialBubble, TutorialBubbleOverlay, or their painters automatically apply to both standalone and engine-driven usage.

The overlay is visible while the associated TutorialEngineController has not finished. When the last step completes via TutorialEngineController.advance or the tutorial is finished early via TutorialEngineController.finish or TutorialEngineController.skip, the overlay is removed.

Inheritance

Constructors

TutorialEngine({Key? key, required TutorialEngineController controller, required Widget child, bool advanceOnBubbleTap = false, bool advanceOnOverlayTap = false, TutorialVisuals? globalVisuals, TutorialPersistence? persistence, String? persistenceId, Set<int>? checkpointSteps, void onComplete(TutorialCompletionReason reason)?})
const

Properties

advanceOnBubbleTap bool
Whether tapping the bubble content should attempt to advance the tutorial to the next step.
final
advanceOnOverlayTap bool
Whether tapping the dark background overlay outside the target should attempt to advance the tutorial to the next step.
final
checkpointSteps Set<int>?
Deprecated compatibility shortcut for checkpoint persistence.
final
child Widget
The underlying application content that the tutorial overlays.
final
controller TutorialEngineController
Controller that owns the ordered list of tutorial steps.
final
globalVisuals TutorialVisuals?
Optional global defaults for visual parameters applied to all steps.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onComplete → void Function(TutorialCompletionReason reason)?
Optional callback invoked when the tutorial ends.
final
persistence TutorialPersistence?
Optional persistence policy for saving tutorial progress.
final
persistenceId String?
Optional identifier used to persist and restore tutorial progress.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<TutorialEngine>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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