FlutstrapProgress constructor

const FlutstrapProgress({
  1. Key? key,
  2. required double value,
  3. double? minValue,
  4. double? maxValue,
  5. FSProgressVariant variant = FSProgressVariant.primary,
  6. FSProgressSize size = FSProgressSize.md,
  7. bool animated = false,
  8. bool striped = false,
  9. String? label,
  10. Widget? customLabel,
  11. Color? backgroundColor,
  12. Color? progressColor,
  13. double? height,
  14. double? fixedWidth,
  15. bool expandToFill = true,
  16. BorderRadiusGeometry? borderRadius,
  17. Duration animationDuration = const Duration(milliseconds: 500),
  18. Curve animationCurve = Curves.easeInOut,
  19. bool validator(
    1. double value,
    2. double minValue,
    3. double maxValue
    )?,
})

Implementation

const FlutstrapProgress({
  super.key,
  required this.value,
  double? minValue,
  double? maxValue,
  this.variant = FSProgressVariant.primary,
  this.size = FSProgressSize.md,
  this.animated = false,
  this.striped = false,
  this.label,
  this.customLabel,
  this.backgroundColor,
  this.progressColor,
  this.height,
  this.fixedWidth,
  this.expandToFill = true,
  this.borderRadius,
  this.animationDuration = const Duration(milliseconds: 500),
  this.animationCurve = Curves.easeInOut,
  this.validator,
})  : minValue = minValue ?? 0.0,
      maxValue = maxValue ?? 100.0,
      assert(value >= 0, 'Value must be non-negative'),
      assert((minValue ?? 0.0) < (maxValue ?? 100.0),
          'minValue must be less than maxValue');