CupertinoOnboarding class

Represents an onboarding screen in iOS 15 style. Works great with modal_bottom_sheet package.

It is possible to restyle this widget to match older iOS versions.

Inheritance

Constructors

CupertinoOnboarding({required List<Widget> pages, Color? backgroundColor, Widget bottomButtonChild = const Text('Continue'), Color? bottomButtonColor, BorderRadius? bottomButtonBorderRadius, EdgeInsets bottomButtonPadding = _kBottomButtonPadding, Widget? widgetAboveBottomButton, Duration pageTransitionAnimationDuration = const Duration(milliseconds: 500), Curve pageTransitionAnimationCurve = Curves.fastEaseInToSlowEaseOut, ScrollPhysics scrollPhysics = const BouncingScrollPhysics(), VoidCallback? onPressed, VoidCallback? onPressedOnLastPage, Key? key})
Default constructor of the CupertinoOnboarding widget. Works great with modal_bottom_sheet package.

Properties

backgroundColor Color?
Background color of the onboarding screen.
final
bottomButtonBorderRadius BorderRadius?
Border radius of the next button.
final
bottomButtonChild Widget
Child used in the bottom button.
final
bottomButtonColor Color?
Background color of the bottom button.
final
bottomButtonPadding EdgeInsets
Padding of the bottom button.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onPressed VoidCallback?
Invoked when the user taps on the bottom button. Usable only if pages length is greater than 1.
final
onPressedOnLastPage VoidCallback?
Invoked when the user taps on the bottom button on the last page. Must not be null to be active.
final
pages List<Widget>
List of Widgets that will be displayed as pages.
final
pageTransitionAnimationCurve Curve
Animation curve that is used to animate the transition between pages.
final
pageTransitionAnimationDuration Duration
Duration that is used to animate the transition between pages.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollPhysics ScrollPhysics
The physics to use for horizontal scrolling between the pages.
final
widgetAboveBottomButton Widget?
Widget that is placed above the bottom button.
final

Methods

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