copyWith method
CustomGaugeConfig
copyWith({
- double? size,
- double? strokeWidth,
- double? indicatorRadius,
- double? indicatorStrokeWidth,
- double? gapSize,
- bool? showCenterText,
- bool? showLabels,
- double? centerTextFontSize,
- double? labelFontSize,
- Color? centerTextColor,
- Color? labelColor,
- Color? backgroundColor,
- Duration? animationDuration,
- Curve? animationCurve,
Creates a copy of this config with the given fields replaced
Implementation
CustomGaugeConfig copyWith({
double? size,
double? strokeWidth,
double? indicatorRadius,
double? indicatorStrokeWidth,
double? gapSize,
bool? showCenterText,
bool? showLabels,
double? centerTextFontSize,
double? labelFontSize,
Color? centerTextColor,
Color? labelColor,
Color? backgroundColor,
Duration? animationDuration,
Curve? animationCurve,
}) {
return CustomGaugeConfig(
size: size ?? this.size,
strokeWidth: strokeWidth ?? this.strokeWidth,
indicatorRadius: indicatorRadius ?? this.indicatorRadius,
indicatorStrokeWidth: indicatorStrokeWidth ?? this.indicatorStrokeWidth,
gapSize: gapSize ?? this.gapSize,
showCenterText: showCenterText ?? this.showCenterText,
showLabels: showLabels ?? this.showLabels,
centerTextFontSize: centerTextFontSize ?? this.centerTextFontSize,
labelFontSize: labelFontSize ?? this.labelFontSize,
centerTextColor: centerTextColor ?? this.centerTextColor,
labelColor: labelColor ?? this.labelColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
animationDuration: animationDuration ?? this.animationDuration,
animationCurve: animationCurve ?? this.animationCurve,
);
}