BankOnboardingCarousel class
First-run value-proposition walkthrough with parallax illustrations, an animated pill dot indicator, and a Next button that morphs into the done label on the last page.
Auto-advance (when enabled) pauses on user touch and is disabled
entirely under MediaQuery.disableAnimations.
BankOnboardingCarousel(
pages: [
BankOnboardingPage(
title: 'Bank without borders',
body: 'Hold, send and exchange 30+ currencies in one place.',
illustration: MyIllustration(),
),
],
onDone: () => Navigator.of(context).pushReplacement(homeRoute),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BankOnboardingCarousel
Constructors
-
BankOnboardingCarousel({required List<
BankOnboardingPage> pages, required VoidCallback onDone, Key? key, VoidCallback? onSkip, String doneLabel = 'Get started', String nextLabel = 'Next', String skipLabel = 'Skip', bool autoAdvance = false, Duration autoAdvanceInterval = const Duration(seconds: 5), Color? buttonBackgroundColor, Color? buttonForegroundColor, BorderRadius? buttonRadius, TextStyle? buttonLabelStyle, Color? activeDotColor, Color? inactiveDotColor, TextStyle? titleStyle, TextStyle? bodyStyle, TextStyle? skipLabelStyle, Duration? animationDuration, Curve? animationCurve}) -
const
Properties
- activeDotColor → Color?
-
Overrides the active dot color. Defaults to the page accent, or
the theme primary.
final
- animationCurve → Curve?
-
Curve of page-turn and dot animations. Defaults to
BankTokens.curveStandard.
final
- animationDuration → Duration?
-
Duration of page-turn, dot, and label animations. Defaults to
BankTokens.durationBase.
final
- autoAdvance → bool
-
Advances pages automatically; pauses while the user is touching.
final
- autoAdvanceInterval → Duration
-
final
- bodyStyle → TextStyle?
-
Merged over the computed page body style (bodyMedium).
final
-
Overrides the primary button fill. Defaults to the theme primary.
final
-
Overrides the primary button text color. Defaults to the theme
onPrimary.
final
-
Merged over the computed button label style (labelLarge).
final
-
Overrides the primary button radius. Defaults to the theme
buttonRadius.
final
- doneLabel → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inactiveDotColor → Color?
-
Overrides the inactive dot color. Defaults to the theme outline.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- nextLabel → String
-
final
- onDone → VoidCallback
-
Fired by the last page's primary button.
final
- onSkip → VoidCallback?
-
Shows a skip affordance on all but the last page when set.
final
-
pages
→ List<
BankOnboardingPage> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipLabel → String
-
final
- skipLabelStyle → TextStyle?
-
Merged over the computed skip label style (labelLarge).
final
- titleStyle → TextStyle?
-
Merged over the computed page title style (headlineLarge).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< BankOnboardingCarousel> -
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