copyWith method
BarChartRodData
copyWith({
- double? fromY,
- double? toY,
- Color? color,
- Gradient? gradient,
- double? width,
- BorderRadius? borderRadius,
- List<
int> ? dashArray, - BorderSide? borderSide,
- BackgroundBarChartRodData? backDrawRodData,
- List<
BarChartRodStackItem> ? rodStackItems,
Copies current BarChartRodData to a new BarChartRodData, and replaces provided values.
Implementation
BarChartRodData copyWith({
double? fromY,
double? toY,
Color? color,
Gradient? gradient,
double? width,
BorderRadius? borderRadius,
List<int>? dashArray,
BorderSide? borderSide,
BackgroundBarChartRodData? backDrawRodData,
List<BarChartRodStackItem>? rodStackItems,
}) {
return BarChartRodData(
fromY: fromY ?? this.fromY,
toY: toY ?? this.toY,
color: color ?? this.color,
gradient: gradient ?? this.gradient,
width: width ?? this.width,
borderRadius: borderRadius ?? this.borderRadius,
borderDashArray: borderDashArray,
borderSide: borderSide ?? this.borderSide,
backDrawRodData: backDrawRodData ?? this.backDrawRodData,
rodStackItems: rodStackItems ?? this.rodStackItems,
);
}