copyWith method
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,
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,
);
}