FlProgress.linear constructor

const FlProgress.linear({
  1. Key? key,
  2. double percent = 0.0,
  3. double lineHeight = 5.0,
  4. double? width,
  5. Color? backgroundColor,
  6. Color? progressColor,
  7. LinearGradient? linearGradient,
  8. bool animation = false,
  9. Duration animationDuration = const Duration(milliseconds: 500),
  10. bool animateFromLastPercent = true,
  11. bool isRTL = false,
  12. Widget? center,
  13. bool addAutomaticKeepAlive = true,
  14. LinearStrokeCap linearStrokeCap = LinearStrokeCap.butt,
  15. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  16. MaskFilter? maskFilter,
  17. bool clipLinearGradient = false,
  18. Curve curve = Curves.linear,
  19. bool restartAnimation = false,
  20. VoidCallback? onAnimationEnd,
  21. 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');