copyWith method

BarChartData copyWith({
  1. bool allowNullPredefinedMaxValue = false,
  2. Map<DateTime, List<double>>? data,
  3. DateTime? initialSelectedPeriod,
  4. double? predefinedMaxValue,
  5. Map<num, num>? maxValueRoundingMap,
  6. TooltipBuilder<List<double>>? titleBuilder,
  7. TooltipBuilder<List<double>>? subtitleBuilder,
  8. RichLabelBuilder<DateTime>? xAxisLabelBuilder,
  9. LabelBuilder<double>? yAxisLabelBuilder,
})

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

Implementation

BarChartData copyWith({
  bool allowNullPredefinedMaxValue = false,
  Map<DateTime, List<double>>? data,
  DateTime? initialSelectedPeriod,
  double? predefinedMaxValue,
  Map<num, num>? maxValueRoundingMap,
  TooltipBuilder<List<double>>? titleBuilder,
  TooltipBuilder<List<double>>? subtitleBuilder,
  RichLabelBuilder<DateTime>? xAxisLabelBuilder,
  LabelBuilder<double>? yAxisLabelBuilder,
}) =>
    BarChartData(
      data: data ?? this.data,
      initialSelectedPeriod: initialSelectedPeriod,
      predefinedMaxValue: allowNullPredefinedMaxValue
          ? predefinedMaxValue
          : predefinedMaxValue ?? this.predefinedMaxValue,
      maxValueRoundingMap: maxValueRoundingMap ?? this.maxValueRoundingMap,
      titleBuilder: titleBuilder ?? this.titleBuilder,
      subtitleBuilder: subtitleBuilder ?? this.subtitleBuilder,
      xAxisLabelBuilder: xAxisLabelBuilder ?? this.xAxisLabelBuilder,
      yAxisLabelBuilder: yAxisLabelBuilder ?? this.yAxisLabelBuilder,
    );