copyWith method

ProgressModel copyWith({
  1. int? width,
  2. String? full,
  3. String? fullColor,
  4. String? empty,
  5. String? emptyColor,
  6. bool? showPercentage,
  7. String? percentFormat,
  8. Style? percentageStyle,
  9. bool? useGradient,
  10. String? gradientColorA,
  11. String? gradientColorB,
  12. List<String>? blend,
  13. ColorFunc? colorFunc,
  14. bool? scaleGradient,
  15. bool? scaleBlend,
  16. bool? indeterminate,
  17. double? pulseWidth,
  18. DateTime? startTime,
  19. double? percentShown,
  20. double? targetPercent,
  21. double? velocity,
  22. double? pulseOffset,
  23. int? tag,
  24. double? frequency,
  25. double? damping,
})

Creates a copy with the given fields replaced.

Implementation

ProgressModel copyWith({
  int? width,
  String? full,
  String? fullColor,
  String? empty,
  String? emptyColor,
  bool? showPercentage,
  String? percentFormat,
  Style? percentageStyle,
  bool? useGradient,
  String? gradientColorA,
  String? gradientColorB,
  List<String>? blend,
  ColorFunc? colorFunc,
  bool? scaleGradient,
  bool? scaleBlend,
  bool? indeterminate,
  double? pulseWidth,
  DateTime? startTime,
  double? percentShown,
  double? targetPercent,
  double? velocity,
  double? pulseOffset,
  int? tag,
  double? frequency,
  double? damping,
}) {
  return ProgressModel(
    width: width ?? this.width,
    full: full ?? this.full,
    fullColor: fullColor ?? this.fullColor,
    empty: empty ?? this.empty,
    emptyColor: emptyColor ?? this.emptyColor,
    showPercentage: showPercentage ?? this.showPercentage,
    percentFormat: percentFormat ?? this.percentFormat,
    percentageStyle: percentageStyle ?? this.percentageStyle,
    useGradient: useGradient ?? this.useGradient,
    gradientColorA: gradientColorA ?? this.gradientColorA,
    gradientColorB: gradientColorB ?? this.gradientColorB,
    blend: blend ?? this.blend,
    colorFunc: colorFunc ?? this.colorFunc,
    scaleGradient: scaleGradient ?? this.scaleGradient,
    scaleBlend: scaleBlend ?? this.scaleBlend,
    indeterminate: indeterminate ?? this.indeterminate,
    pulseWidth: pulseWidth ?? this.pulseWidth,
    startTime: startTime ?? this.startTime,
    percentShown: percentShown ?? _percentShown,
    targetPercent: targetPercent ?? _targetPercent,
    velocity: velocity ?? _velocity,
    pulseOffset: pulseOffset ?? _pulseOffset,
    id: _id,
    tag: tag ?? _tag,
    frequency: frequency ?? this.frequency,
    damping: damping ?? this.damping,
  );
}