StepProgress class

A widget that displays a step progress indicator.

The StepProgress widget is a customizable step progress indicator that can be used to show the progress of a multi-step process.

The totalSteps parameter is required and specifies the total number of steps in the progress indicator.

The controller parameter can be used to control the progress of the steps.

The currentStep parameter specifies the current step in the progress indicator. It defaults to -1.

The stepNodeSize parameter specifies the size of each step. It defaults to 34.

The theme parameter specifies the theme data for the step progress indicator. It defaults to StepProgressThemeData.

The margin parameter specifies the margin around the step progress indicator. It defaults to EdgeInsets.zero.

The padding parameter specifies the padding inside the step progress indicator. It defaults to EdgeInsets.zero.

The axis parameter specifies the axis along which the steps are laid out. It defaults to Axis.horizontal.

The nodeTitles parameter can be used to specify titles for each step.

The nodeSubTitles parameter can be used to specify subtitles for steps.

The lineTitles parameter can be used to specify titles for each step line segment.

The lineSubTitles parameter can be used to specify subTitles for each step line segment.

The visibilityOptions parameter can be used to control the visibility of step progress elements. It defaults to StepProgressVisibilityOptions.nodeThenLine.

The highlightOptions parameter specifies the highlight behavior for the step progress indicator. It defaults to StepProgressHighlightOptions.highlightCompletedNodesAndLines.

The width parameter specifies the width of the step progress widget.

The height parameter specifies the height of the step progress widget.

The onStepNodeTapped parameter is a callback that is called when a step node is tapped.

The onStepLineTapped parameter is a callback that is called when a step line is tapped.

The onStepChanged parameter is a callback that is called when the current step changes.

The nodeIconBuilder parameter is a builder function to create custom icons for each step node.

The nodeLabelBuilder parameter is a builder function for creating custom label widgets for step nodes.

The lineLabelBuilder parameter is a builder function for creating custom label widgets for step lines.

The reversed parameter indicates whether the step progress is displayed in reverse order. It defaults to false.

The autoStartProgress parameter determines whether the progress should automatically start when the widget is initialized. It defaults to false.

The hasEqualNodeAndLineCount parameter determines whether nodes and lines have equal counts. It defaults to false.

Inheritance

Constructors

StepProgress({required int totalSteps, StepProgressController? controller, int currentStep = -1, Key? key, double stepNodeSize = 34, double? width, double? height, StepProgressThemeData theme = const StepProgressThemeData(), EdgeInsets margin = EdgeInsets.zero, EdgeInsets padding = EdgeInsets.zero, Axis axis = Axis.horizontal, bool reversed = false, bool hasEqualNodeAndLineCount = false, bool autoStartProgress = false, StepProgressVisibilityOptions visibilityOptions = StepProgressVisibilityOptions.nodeThenLine, StepProgressHighlightOptions highlightOptions = StepProgressHighlightOptions.highlightCompletedNodesAndLines, List<String>? nodeTitles, List<String>? nodeSubTitles, List<String>? lineTitles, List<String>? lineSubTitles, OnStepNodeTapped? onStepNodeTapped, OnStepLineTapped? onStepLineTapped, OnStepChanged? onStepChanged, StepNodeIconBuilder? nodeIconBuilder, StepLabelBuilder? nodeLabelBuilder, StepLabelBuilder? lineLabelBuilder})
const

Properties

autoStartProgress bool
Whether the progress should start automatically when the widget is built.
final
axis Axis
Axis along which the steps are arranged (horizontal or vertical)
final
controller StepProgressController?
The controller that manages the state and behavior of the step progress.
final
currentStep int
Current step in the progress
final
hasEqualNodeAndLineCount bool
Determines whether nodes and lines have equal counts.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
The height of the step progress widget.
final
highlightOptions StepProgressHighlightOptions
Options to customize the highlight behavior of the step progress.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lineLabelBuilder StepLabelBuilder?
A builder for creating custom label widgets for step lines.
final
lineSubTitles List<String>?
List of subTitles for the line segments in the progress indicator.
final
lineTitles List<String>?
List of titles for the line segments in the progress indicator.
final
margin EdgeInsets
The margin around the step progress widget.
final
nodeIconBuilder StepNodeIconBuilder?
A builder function to create custom icons for each step node.
final
nodeLabelBuilder StepLabelBuilder?
A builder for creating custom label widgets for step nodes.
final
nodeSubTitles List<String>?
List of Subtitles for each step in the progress
final
nodeTitles List<String>?
List of Titles for each step in the progress
final
onStepChanged OnStepChanged?
Callback function that is called when the step changes.
final
onStepLineTapped OnStepLineTapped?
Callback function that is triggered when a step line is tapped.
final
onStepNodeTapped OnStepNodeTapped?
Callback function when a step is tapped
final
padding EdgeInsets
The padding inside the step progress widget.
final
reversed bool
Indicates whether the step progress is displayed in reverse order.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stepNodeSize double
Size of each step indicator
final
theme StepProgressThemeData
Theme data for customizing the step progress appearance
final
totalSteps int
Total number of steps in the progress
final
visibilityOptions StepProgressVisibilityOptions
Options to control the visibility of step progress elements.
final
width double?
The width of the step progress widget.
final

Methods

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