StepProgressIndicator class

(Linear) Progress indicator made of a series of steps

Developed and published by Sandro Maglione https://www.sandromaglione.com

Check out the official tutorial on https://www.sandromaglione.com/blog

Inheritance

Constructors

StepProgressIndicator({required int totalSteps, Widget customStep(int, Color, double)?, void Function() onTap(int)?, Color customColor(int)?, double customSize(int, bool)?, double? selectedSize, double? unselectedSize, Radius? roundedEdges, Gradient? gradientColor, Gradient? selectedGradientColor, Gradient? unselectedGradientColor, BlendMode? blendMode, Axis direction = Axis.horizontal, TextDirection progressDirection = TextDirection.ltr, double size = 4.0, int currentStep = 0, Color selectedColor = Colors.blue, Color unselectedColor = Colors.grey, double padding = 2.0, double fallbackLength = 100.0, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.center, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center, MainAxisAlignment stepMainAxisAlignment = MainAxisAlignment.center, CrossAxisAlignment stepCrossAxisAlignment = CrossAxisAlignment.center, Key? key})
const

Properties

blendMode BlendMode?
Apply BlendMode to ShaderMask when gradientColor, selectedGradientColor, or unselectedGradientColor defined
final
crossAxisAlignment CrossAxisAlignment
Assign alignment CrossAxisAlignment for indicator's container
final
currentStep int
Number of steps to underline, all the steps with index <= currentStep will have Color equal to selectedColor
final
customColor Color Function(int)?
Assign a custom Color for each step
final
customSize double Function(int, bool)?
Assign a custom size double for each step
final
customStep Widget Function(int, Color, double)?
Defines a custom Widget to display at each step instead of a simple container, given the current step index, the Color of the step, which could be defined with selectedColor and unselectedColor or using customColor, and its size double, which could be defined using size, selectedSize, unselectedSize, or customSize. When progressDirection is TextDirection.rtl, the index count starts from the last step i.e. the right-most step in the indicator has index 0
final
direction Axis
Defines if indicator is horizontal Axis.horizontal or vertical Axis.vertical
final
fallbackLength double
Length of the progress indicator in case the main axis (based on direction attribute) has no size limit i.e. double.infinity
final
gradientColor Gradient?
Adds a gradient color to the indicator
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxisAlignment MainAxisAlignment
Assign alignment MainAxisAlignment for indicator's container
final
maxDefinedSize double
Compute the maximum possible size of the indicator between size, selectedSize, unselectedSize, and customSize
no setter
onTap → void Function() Function(int)?
Defines onTap function given index of the pressed step.
final
padding double
Spacing between each step
final
progressDirection TextDirection
Defines if steps grow from left-to-right / top-to-bottom TextDirection.ltr or right-to-left / bottom-to-top TextDirection.rtl
final
roundedEdges Radius?
Added rounded corners to the first and last step of the indicator
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedColor Color
Color of the selected steps
final
selectedGradientColor Gradient?
Adds a gradient color to the selected steps of the indicator
final
selectedSize double?
Specify a custom size for selected steps
final
size double
Height (when direction is Axis.horizontal) or width (when direction is Axis.vertical) of a single indicator step
final
stepCrossAxisAlignment CrossAxisAlignment
Assign alignment CrossAxisAlignment for a single step
final
stepMainAxisAlignment MainAxisAlignment
Assign alignment MainAxisAlignment for a single step
final
totalSteps int
Total number of step of the complete indicator
final
unselectedColor Color
Color of the unselected steps
final
unselectedGradientColor Gradient?
Adds a gradient color to the unselected steps of the indicator
final
unselectedSize double?
Specify a custom size for unselected steps
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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