copyWith method

CustomGaugeConfig copyWith({
  1. double? size,
  2. double? strokeWidth,
  3. double? indicatorRadius,
  4. double? indicatorStrokeWidth,
  5. double? gapSize,
  6. bool? showCenterText,
  7. bool? showLabels,
  8. double? centerTextFontSize,
  9. double? labelFontSize,
  10. Color? centerTextColor,
  11. Color? labelColor,
  12. Color? backgroundColor,
  13. Duration? animationDuration,
  14. 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,
  );
}