copyWith method

GaugeChartSettings copyWith({
  1. bool allowNullColorPattern = false,
  2. List<int>? colorPattern,
  3. double? sectionStroke,
  4. double? selectedSectionStroke,
  5. double? gaugeAngle,
  6. bool? debugMode,
  7. bool? selectionEnabled,
  8. HitTestBehavior? behavior,
  9. bool? runInitialAnimation,
})

Creates a copy of the current object with new values specified in arguments.

Implementation

GaugeChartSettings copyWith({
  bool allowNullColorPattern = false,
  List<int>? colorPattern,
  double? sectionStroke,
  double? selectedSectionStroke,
  double? gaugeAngle,
  bool? debugMode,
  bool? selectionEnabled,
  HitTestBehavior? behavior,
  bool? runInitialAnimation,
}) =>
    GaugeChartSettings(
      colorPattern: allowNullColorPattern
          ? colorPattern
          : colorPattern ?? this.colorPattern,
      sectionStroke: sectionStroke ?? this.sectionStroke,
      selectedSectionStroke:
          selectedSectionStroke ?? this.selectedSectionStroke,
      gaugeAngle: gaugeAngle ?? this.gaugeAngle,
      debugMode: debugMode ?? this.debugMode,
      selectionEnabled: selectionEnabled ?? this.selectionEnabled,
      behavior: behavior ?? this.behavior,
      runInitialAnimation: runInitialAnimation ?? this.runInitialAnimation,
    );