HorizontalProgressBar constructor
const
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,
- bool isThumbVisible = true,
Implementation
const HorizontalProgressBar({
super.key,
required this.maxValue,
required this.currentPosition,
required this.onChanged,
this.width,
this.bufferedPosition,
this.onChangeStart,
this.onChangeEnd,
this.bufferedColor = Colors.grey,
this.progressColor = Colors.blue,
this.thumbColor = const Color.fromRGBO(13, 71, 161, 1),
this.thumbDiameter = 15,
this.trackHeight = 10,
this.enabledHeight = 10,
this.isThumbVisible = true,
}) : assert(trackHeight < thumbDiameter,
'trackHeight must be less than thumbDiameter'),
assert(currentPosition >= 0 && currentPosition <= maxValue,
'currentPosition must be within 0 and maxValue');