HorizontalProgressBar class

The class HorizontalProgressBar is used to create a horizontal progress bar. The required parameters of the HorizontalProgressBar are maxValue, currentPosition and onChanged

Use of HorizontalProgressBar

example:

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

Constructors

HorizontalProgressBar({Key? key, required double maxValue, required double currentPosition, required ValueChanged<double> onChanged, double? width, 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 = 15, double trackHeight = 10, double enabledHeight = 10})
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
enabledHeight double
enabledHeight refers the height of the gesture detector which can be used for dragging
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxValue double
maxValue represents the maximum value of the progress bar, the value ranges from 0 to maxValue.
final
onChanged ValueChanged<double>
onChanged Callback function. Called whenever the progressbar's current value gots changed.
final
onChangeEnd ValueChanged<double>?
onChangeEnd Callback function. Called whenever the progressbar's current value changes ends. It 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 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.
final
trackHeight double
trackHeight Height of the progress and buffered track
final
width double?
width sets the width of the progress bar
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