FlProgress.linear constructor
const
FlProgress.linear({
- Key? key,
- double percent = 0.0,
- double lineHeight = 5.0,
- double? width,
- Color? backgroundColor,
- Color? progressColor,
- LinearGradient? linearGradient,
- bool animation = false,
- Duration animationDuration = const Duration(milliseconds: 500),
- bool animateFromLastPercent = true,
- bool isRTL = false,
- Widget? center,
- bool addAutomaticKeepAlive = true,
- LinearStrokeCap linearStrokeCap = LinearStrokeCap.butt,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- MaskFilter? maskFilter,
- bool clipLinearGradient = false,
- Curve curve = Curves.linear,
- bool restartAnimation = false,
- VoidCallback? onAnimationEnd,
- Widget? widgetIndicator,
Implementation
const FlProgress.linear({
super.key,
this.percent = 0.0,
this.lineHeight = 5.0,
this.width,
this.backgroundColor,
this.progressColor,
this.linearGradient,
this.animation = false,
this.animationDuration = const Duration(milliseconds: 500),
this.animateFromLastPercent = true,
this.isRTL = false,
this.center,
this.addAutomaticKeepAlive = true,
this.linearStrokeCap = LinearStrokeCap.butt,
this.mainAxisAlignment = MainAxisAlignment.start,
this.maskFilter,
this.clipLinearGradient = false,
this.curve = Curves.linear,
this.restartAnimation = false,
this.onAnimationEnd,
this.widgetIndicator,
}) : assert(linearGradient != null || progressColor != null,
'Cannot provide both linearGradient and progressColor');