GFProgressBar constructor
GFProgressBar({
- Key? key,
- EdgeInsets? margin = const EdgeInsets.only(left: 10, right: 10),
- double percentage = 0.2,
- double circleWidth = 5.0,
- double circleStartAngle = 0.0,
- double? radius,
- Color backgroundColor = const Color(0xFFB8C7CB),
- Color progressBarColor = Colors.red,
- LinearGradient? linearGradient,
- bool animation = false,
- int animationDuration = 700,
- Widget? child,
- bool autoLive = true,
- bool animateFromLastPercentage = false,
- bool reverse = false,
- MaskFilter? mask,
- GFProgressType type = GFProgressType.linear,
- GFProgressHeadType? progressHeadType,
- double lineHeight = 5.0,
- double? width,
- bool fromRightToLeft = false,
- Widget? leading,
- Widget? trailing,
- EdgeInsets? padding,
- MainAxisAlignment alignment = MainAxisAlignment.start,
- bool clipLinearGradient = false,
- bool? isDragable = false,
- ValueChanged<
double> ? onProgressChanged,
Shows progress as a completed and remaining percentage in bar of given state
Implementation
GFProgressBar({
Key? key,
this.margin = const EdgeInsets.only(left: 10, right: 10),
this.percentage = 0.2,
this.circleWidth = 5.0,
this.circleStartAngle = 0.0,
this.radius,
this.backgroundColor = const Color(0xFFB8C7CB),
this.progressBarColor = Colors.red,
this.linearGradient,
this.animation = false,
this.animationDuration = 700,
this.child,
this.autoLive = true,
this.animateFromLastPercentage = false,
this.reverse = false,
this.mask,
this.type = GFProgressType.linear,
this.progressHeadType,
this.lineHeight = 5.0,
this.width,
this.fromRightToLeft = false,
this.leading,
this.trailing,
this.padding,
this.alignment = MainAxisAlignment.start,
this.clipLinearGradient = false,
this.isDragable = false,
this.onProgressChanged,
}) : super(key: key) {
// if (linearGradient != null) {
// throw ArgumentError(' linearGradient cannot be given');
// }
if (circleStartAngle < 0.0) {
throw Exception('circleStartAngle cannot be less than zero');
}
if (percentage < 0.0 || percentage > 1.0) {
throw Exception('Percentage value must be be tween 0.0 and 1.0');
}
}