VerticalProgressBar class

The class VerticalProgressBar is used to create a vertical progress bar. The required parameters of the VerticalProgressBar are: height, maxValue, currentPosition, and onChanged.

Use of VerticalProgressBar

VerticalProgressBar(
  height: 200,
  maxValue: 10,
  // [currentPosition] should be declared before its uses
  currentPosition: currentPosition,
  onChanged: (val) {
    setState(() {
      currentPosition = val;
    });
  },
)

Notes:

  • Same fixes as Horizontal: smooth precision, clamping, and safe drag end handling.
  • Full height used for touch detection.
Inheritance

Constructors

VerticalProgressBar({Key? key, required double height, required double maxValue, required double currentPosition, required ValueChanged<double> onChanged, double? bufferedPosition, ValueChanged<double>? onChangeStart, ValueChanged<double>? onChangeEnd, Color bufferedColor = Colors.grey, Color progressColor = Colors.blue, Color thumbColor = const Color.fromRGBO(13, 71, 161, 1), double thumbDiameter = 18, double trackWidth = 10, double enabledWidth = 10, bool isThumbVisible = true})
const

Properties

bufferedColor Color
bufferedColor Buffered area color.
final
bufferedPosition double?
bufferedPosition Represents the buffered value.
final
currentPosition double
currentPosition Represents the progressbar's current position.
final
enabledWidth double
enabledWidth Width of the gesture detector used for dragging.
final
hashCode int
The hash code for this object.
no setterinherited
height double
height sets the height of the progress bar.
final
isThumbVisible bool
isThumbVisible sets whether the thumb is visible or not.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxValue double
maxValue Represents the maximum value the progressbar can have.
final
onChanged ValueChanged<double>
onChanged Callback function. Called whenever the progressbar's current value gets changed.
final
onChangeEnd ValueChanged<double>?
onChangeEnd Callback function. Called whenever the progressbar's current value change ends. It is only called when the progressbar is dragged.
final
onChangeStart ValueChanged<double>?
onChangeStart Callback function. Called whenever the progressbar's current value starts to be changed. It is only called when the progressbar is dragged.
final
progressColor Color
progressColor Progress area color.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thumbColor Color
thumbColor Thumb color.
final
thumbDiameter double
thumbDiameter The diameter of the thumb; it should be greater than trackWidth.
final
trackWidth double
trackWidth Width of the progress and buffered track.
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