DotStepper class

A family of fully customizable, beautiful page indicator widgets with awesome built-in animations. Each dot in a DotStepper represents a step.

The DotStepper can be controller in 2 ways: Using external buttons or by tapping individual dots. The tapping behavior can also be disabled.

The DotStepper provides out-of-the-box indicators with modern beautiful transition effects. Further, the DotStepper supports different shapes such as, circle, rectangle, stadium, etc.

The DotStepper supports managing the radius of the dots, the spacing betweeen dots, enabling lineConnectors between dots, etc.

It can be customized using many ways, one such being the built-in decorations for fixedDots, indicators, line-connectors, etc.

For more information, See Example.

Inheritance

Constructors

DotStepper({required int activeStep, int dotCount = 2, double dotRadius = 24, double spacing = 0.0, Axis direction = Axis.horizontal, Shape shape = Shape.circle, Indicator indicator = Indicator.shift, FixedDotDecoration fixedDotDecoration = const FixedDotDecoration(), IndicatorDecoration indicatorDecoration = const IndicatorDecoration(), LineConnectorDecoration lineConnectorDecoration = const LineConnectorDecoration(), bool tappingEnabled = true, bool lineConnectorsEnabled = false, OnDotTapped? onDotTapped})

Properties

activeStep int
The currently active dot, hence the step.
final
direction Axis
The direction in which to display the dots on the screen, i.e., horizontally or vertically.
final
dotCount int
The total number of dots. Each dot represents a step.
final
dotRadius double
The radius of a dot.
final
fixedDotDecoration FixedDotDecoration
The decoration to use for the fixed dots.
final
hashCode int
The hash code for this object.
no setterinherited
indicator Indicator
The indicator to use.
final
indicatorDecoration IndicatorDecoration
The decoration to use for the indicator.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lineConnectorDecoration LineConnectorDecoration
The decoration to use for the line connectors.
final
lineConnectorsEnabled bool
Enable or disable the line-connectors.
final
onDotTapped OnDotTapped?
Callback fired when a dot is tapped.
Note: You must update the activeDot in your StatefulWidget to tappedDotIndex provided by this callback inside a setState() method, for tapping to function flawlessly.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape Shape
The shape of the dots and the indicator.
final
spacing double
The spacing between the dots.
final
tappingEnabled bool
Enable or disable tapping on dots.
final

Methods

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