ProgressModel constructor

ProgressModel({
  1. int width = _defaultWidth,
  2. String full = defaultFullCharHalfBlock,
  3. String fullColor = '#7571F9',
  4. String empty = defaultEmptyCharBlock,
  5. String emptyColor = '#606060',
  6. bool showPercentage = true,
  7. String percentFormat = ' %3.0f%%',
  8. Style? percentageStyle,
  9. double frequency = _defaultFrequency,
  10. double damping = _defaultDamping,
  11. bool useGradient = false,
  12. String gradientColorA = '#5A56E0',
  13. String gradientColorB = '#EE6FF8',
  14. List<String> blend = const [],
  15. ColorFunc? colorFunc,
  16. bool scaleGradient = false,
  17. bool scaleBlend = false,
  18. bool indeterminate = false,
  19. double pulseWidth = 0.2,
  20. DateTime? startTime,
  21. double percentShown = 0,
  22. double targetPercent = 0,
  23. double velocity = 0,
  24. double pulseOffset = 0,
  25. int? id,
  26. int tag = 0,
})

Creates a new progress bar model.

Implementation

ProgressModel({
  this.width = _defaultWidth,
  this.full = defaultFullCharHalfBlock,
  this.fullColor = '#7571F9',
  this.empty = defaultEmptyCharBlock,
  this.emptyColor = '#606060',
  this.showPercentage = true,
  this.percentFormat = ' %3.0f%%',
  Style? percentageStyle,
  this.frequency = _defaultFrequency,
  this.damping = _defaultDamping,
  this.useGradient = false,
  this.gradientColorA = '#5A56E0',
  this.gradientColorB = '#EE6FF8',
  this.blend = const [],
  this.colorFunc,
  this.scaleGradient = false,
  this.scaleBlend = false,
  this.indeterminate = false,
  this.pulseWidth = 0.2,
  this.startTime,
  double percentShown = 0,
  double targetPercent = 0,
  double velocity = 0,
  double pulseOffset = 0,
  int? id,
  int tag = 0,
}) : percentageStyle = percentageStyle ?? Style(),
     _spring = _Spring(frequency: frequency, damping: damping),
     _percentShown = percentShown,
     _targetPercent = targetPercent,
     _velocity = velocity,
     _pulseOffset = pulseOffset,
     _id = id ?? _nextProgressId(),
     _tag = tag;