copyWith method

LineChartData copyWith({
  1. List<LineChartBarData>? lineBarsData,
  2. List<BetweenBarsData>? betweenBarsData,
  3. FlTitlesData? titlesData,
  4. RangeAnnotations? rangeAnnotations,
  5. ExtraLinesData? extraLinesData,
  6. LineTouchData? lineTouchData,
  7. List<ShowingTooltipIndicators>? showingTooltipIndicators,
  8. FlGridData? gridData,
  9. FlBorderData? borderData,
  10. double? minX,
  11. double? maxX,
  12. double? baselineX,
  13. double? minY,
  14. double? maxY,
  15. double? baselineY,
  16. FlClipData? clipData,
  17. Color? backgroundColor,
})

Copies current LineChartData to a new LineChartData, and replaces provided values.

Implementation

LineChartData copyWith({
  List<LineChartBarData>? lineBarsData,
  List<BetweenBarsData>? betweenBarsData,
  FlTitlesData? titlesData,
  RangeAnnotations? rangeAnnotations,
  ExtraLinesData? extraLinesData,
  LineTouchData? lineTouchData,
  List<ShowingTooltipIndicators>? showingTooltipIndicators,
  FlGridData? gridData,
  FlBorderData? borderData,
  double? minX,
  double? maxX,
  double? baselineX,
  double? minY,
  double? maxY,
  double? baselineY,
  FlClipData? clipData,
  Color? backgroundColor,
}) =>
    LineChartData(
      lineBarsData: lineBarsData ?? this.lineBarsData,
      betweenBarsData: betweenBarsData ?? this.betweenBarsData,
      titlesData: titlesData ?? this.titlesData,
      rangeAnnotations: rangeAnnotations ?? this.rangeAnnotations,
      extraLinesData: extraLinesData ?? this.extraLinesData,
      lineTouchData: lineTouchData ?? this.lineTouchData,
      showingTooltipIndicators:
          showingTooltipIndicators ?? this.showingTooltipIndicators,
      gridData: gridData ?? this.gridData,
      borderData: borderData ?? this.borderData,
      minX: minX ?? this.minX,
      maxX: maxX ?? this.maxX,
      baselineX: baselineX ?? this.baselineX,
      minY: minY ?? this.minY,
      maxY: maxY ?? this.maxY,
      baselineY: baselineY ?? this.baselineY,
      clipData: clipData ?? this.clipData,
      backgroundColor: backgroundColor ?? this.backgroundColor,
    );