LinearPercentIndicator constructor

LinearPercentIndicator({
  1. Key? key,
  2. PercentModel percentModel = PercentModel.normal,
  3. AnimationSet animationSet = AnimationSet.normal,
  4. bool isRTL = false,
  5. double? width,
  6. double lineHeight = 5.0,
  7. ColorGradientModel backgroundGradient = ColorGradientModel.backModel,
  8. ColorGradientModel progressGradient = ColorGradientModel.progressModel,
  9. CenterSet centerSet = CenterSet.normal,
  10. StrokeCap strokeCap = StrokeCap.butt,
  11. MaskFilter? maskFilter,
  12. bool clipLinearGradient = false,
  13. bool addAutomaticKeepAlive = true,
})

Implementation

LinearPercentIndicator(
    {Key? key,
    this.percentModel = PercentModel.normal,
    this.animationSet = AnimationSet.normal,
    this.isRTL = false,
    this.width,
    this.lineHeight = 5.0,
    this.backgroundGradient = ColorGradientModel.backModel,
    this.progressGradient = ColorGradientModel.progressModel,
    this.centerSet = CenterSet.normal,
    this.strokeCap = StrokeCap.butt,
    this.maskFilter,
    this.clipLinearGradient = false,
    this.addAutomaticKeepAlive = true})
    : super(key: key) {
  if (percentModel.percent < 0.0 || percentModel.percent > 1.0) {
    throw Exception('Percent value must be a double between 0.0 and 1.0');
  }
}