copyWith method

LineChartBarData copyWith({
  1. List<FlSpot>? spots,
  2. bool? show,
  3. Color? color,
  4. Gradient? gradient,
  5. double? barWidth,
  6. bool? isCurved,
  7. double? curveSmoothness,
  8. bool? preventCurveOverShooting,
  9. double? preventCurveOvershootingThreshold,
  10. bool? isStrokeCapRound,
  11. bool? isStrokeJoinRound,
  12. BarAreaData? belowBarData,
  13. BarAreaData? aboveBarData,
  14. FlDotData? dotData,
  15. FlErrorIndicatorData<LineChartSpotErrorRangeCallbackInput>? errorIndicatorData,
  16. List<int>? dashArray,
  17. List<int>? showingIndicators,
  18. Shadow? shadow,
  19. bool? isStepLineChart,
  20. LineChartStepData? lineChartStepData,
})

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

Implementation

LineChartBarData copyWith({
  List<FlSpot>? spots,
  bool? show,
  Color? color,
  Gradient? gradient,
  double? barWidth,
  bool? isCurved,
  double? curveSmoothness,
  bool? preventCurveOverShooting,
  double? preventCurveOvershootingThreshold,
  bool? isStrokeCapRound,
  bool? isStrokeJoinRound,
  BarAreaData? belowBarData,
  BarAreaData? aboveBarData,
  FlDotData? dotData,
  FlErrorIndicatorData<LineChartSpotErrorRangeCallbackInput>?
      errorIndicatorData,
  List<int>? dashArray,
  List<int>? showingIndicators,
  Shadow? shadow,
  bool? isStepLineChart,
  LineChartStepData? lineChartStepData,
}) =>
    LineChartBarData(
      spots: spots ?? this.spots,
      show: show ?? this.show,
      color: color ?? this.color,
      gradient: gradient ?? this.gradient,
      barWidth: barWidth ?? this.barWidth,
      isCurved: isCurved ?? this.isCurved,
      curveSmoothness: curveSmoothness ?? this.curveSmoothness,
      preventCurveOverShooting:
          preventCurveOverShooting ?? this.preventCurveOverShooting,
      preventCurveOvershootingThreshold: preventCurveOvershootingThreshold ??
          this.preventCurveOvershootingThreshold,
      isStrokeCapRound: isStrokeCapRound ?? this.isStrokeCapRound,
      isStrokeJoinRound: isStrokeJoinRound ?? this.isStrokeJoinRound,
      belowBarData: belowBarData ?? this.belowBarData,
      aboveBarData: aboveBarData ?? this.aboveBarData,
      dashArray: dashArray ?? this.dashArray,
      dotData: dotData ?? this.dotData,
      errorIndicatorData: errorIndicatorData ?? this.errorIndicatorData,
      showingIndicators: showingIndicators ?? this.showingIndicators,
      shadow: shadow ?? this.shadow,
      isStepLineChart: isStepLineChart ?? this.isStepLineChart,
      lineChartStepData: lineChartStepData ?? this.lineChartStepData,
    );