copyWith method

GaugeScaleStyle copyWith({
  1. Color? tickColor,
  2. bool clearTickColor = false,
  3. double? tickWidth,
  4. bool clearTickWidth = false,
  5. double? tickLength,
  6. bool clearTickLength = false,
  7. GaugeTickPosition? tickPosition,
  8. double? tickGap,
  9. Color? minorTickColor,
  10. bool clearMinorTickColor = false,
  11. double? minorTickWidth,
  12. double? minorTickLength,
  13. PolarLabelStyle? labelStyle,
  14. GaugeScaleLabelPosition? labelPosition,
  15. double? labelOffset,
  16. double? labelMaxWidth,
})

Implementation

GaugeScaleStyle copyWith({
  Color? tickColor,
  bool clearTickColor = false,
  double? tickWidth,
  bool clearTickWidth = false,
  double? tickLength,
  bool clearTickLength = false,
  GaugeTickPosition? tickPosition,
  double? tickGap,
  Color? minorTickColor,
  bool clearMinorTickColor = false,
  double? minorTickWidth,
  double? minorTickLength,
  PolarLabelStyle? labelStyle,
  GaugeScaleLabelPosition? labelPosition,
  double? labelOffset,
  double? labelMaxWidth,
}) => GaugeScaleStyle(
  tickColor: clearTickColor ? null : (tickColor ?? this.tickColor),
  tickWidth: clearTickWidth ? null : (tickWidth ?? this.tickWidth),
  tickLength: clearTickLength ? null : (tickLength ?? this.tickLength),
  tickPosition: tickPosition ?? this.tickPosition,
  tickGap: tickGap ?? this.tickGap,
  minorTickColor: clearMinorTickColor
      ? null
      : (minorTickColor ?? this.minorTickColor),
  minorTickWidth: minorTickWidth ?? this.minorTickWidth,
  minorTickLength: minorTickLength ?? this.minorTickLength,
  labelStyle: labelStyle ?? this.labelStyle,
  labelPosition: labelPosition ?? this.labelPosition,
  labelOffset: labelOffset ?? this.labelOffset,
  labelMaxWidth: labelMaxWidth ?? this.labelMaxWidth,
);