TutorialOverlay<T> class
Wrap your initial screen with this widget to enable tutorial functionality.
Works with Tutorial controller to render tooltips and indicators (e.g., arrows, circles) for a tutorial identified by tutorialId.
{@tool snippet}
TutorialOverlay<String>(
tutorialId: 'home',
width: 320,
child: const MyHomePage(),
)
{@end-tool}
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TutorialOverlay
Constructors
- TutorialOverlay({Key? key, required Widget child, required T tutorialId, required double width, double? height, Decoration? decoration, EdgeInsetsGeometry? padding, bool dismissOnTap = true, Widget? indicator, double? indicatorHeight, double? indicatorWidth, Color overlayColor = Colors.black54, double radius = 4, EdgeInsets? focusOverlayPadding})
-
const
Properties
- child → Widget
-
The screen content to display under the tutorial overlay.
final
- decoration → Decoration?
-
Optional decoration of tooltip container.
final
- dismissOnTap → bool
-
Whether the tutorial ends when tapping outside the tooltip. (default: true)
final
- focusOverlayPadding → EdgeInsets?
-
Padding of highlight area around the target widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Optional height of tooltip container.
final
- indicator → Widget?
-
Default custom widget that points to the target. (e.g. arrow)
final
- indicatorHeight → double?
-
Default height of indicator.
final
- indicatorWidth → double?
-
Default width of indicator.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- overlayColor → Color
-
Color of the overlay covering the area outside the target widget. (default: Colors.black54)
final
- padding → EdgeInsetsGeometry?
-
Optional padding of tooltip container.
final
- radius → double
-
Corner radius of highlighted area around the target widget. (default: 4)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tutorialId → T
-
Unique ID matching the tutorial in Tutorial controller
final
- width → double
-
Width of tooltip container. (Required)
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< TutorialOverlay> -
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