copyWith method
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,
- List<
int> ? dashArray, - List<
int> ? showingIndicators, - Shadow? shadow,
- bool? isStepLineChart,
- 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,
List<int>? dashArray,
List<int>? showingIndicators,
Shadow? shadow,
bool? isStepLineChart,
LineChartStepData? lineChartStepData,
}) {
return 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,
showingIndicators: showingIndicators ?? this.showingIndicators,
shadow: shadow ?? this.shadow,
isStepLineChart: isStepLineChart ?? this.isStepLineChart,
lineChartStepData: lineChartStepData ?? this.lineChartStepData,
);
}