Onboarding class

Inheritance

Constructors

Onboarding({Key? key, int initialIndex = 0, ValueChanged<int>? onChanged, ValueChanged<int>? onEnd, bool autoSizeTexts = false, required List<OnboardingStep> steps, required Widget child, Duration duration = const Duration(milliseconds: 350), bool globalOnboarding = false, bool debugBoundaries = false, double scaleHeight = 1.0, double scaleWidth = 1.0})
Onboarding is a widget that hold all the logic about reading the provided steps, launching OnboardingOverlay on demand, paginate trought steps and notify you via callbacks for the progress and the end of the onboarding session At least steps and child should be non-null
const

Properties

autoSizeTexts bool
By default, the value used is false Sometimes the titleText and the bodyText might not fit well in the constrained label box, because of the long texts, longer translations or smaller screens. There are 2 behaviors for this scenario. The default one will limit the title to 2 lines and the bodyText to 5 lines and will overflow both with ellipsis, the second one is to automatically resize the texts. This is controlled by the Onboarding property autoSizeTexts, which default value is false.
final
child Widget
is required
final
debugBoundaries bool
By default, the value used is false
final
duration Duration
By default, the value used is Duration(milliseconds: 350)
final
globalOnboarding bool
By default, the value used is false If your app has 2 or more top level contexts and the Onboarding is set in the widget tree of one of them Because the Onboarding is using Overlay from the closest context, you might end up with not covering the whole app with the Overlay and have wrong positions of the hole for the focused widget Change to true if you have one or both of the above mentiond problems. This will make the Onboarding to use the root level Overlay
final
hashCode int
The hash code for this object.
no setterinherited
initialIndex int
The first index of the Onboarding, by default it is 0
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged ValueChanged<int>?
A callback that signal when the Onboarding changes step
final
onEnd ValueChanged<int>?
A callback that signal when the Onboarding is finished or stopped
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleHeight double
By default the value is 1.0. That property would be used with responsive_framework package, which scales the widgets
final
scaleWidth double
By default the value is 1.0. That property would be used with responsive_framework package, which scales the widgets
final
steps List<OnboardingStep>
is required
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() OnboardingState
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}) 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

Static Methods

of(BuildContext context, {bool rootOnboarding = false}) OnboardingState?
Get the closest Onboarding state in the widget tree