copyWith method
Copies current PieChartSectionData to a new PieChartSectionData, and replaces provided values.
Implementation
PieChartSectionData copyWith({
double? value,
Color? color,
Gradient? gradient,
double? radius,
bool? showTitle,
TextStyle? titleStyle,
String? title,
BorderSide? borderSide,
Widget? badgeWidget,
double? titlePositionPercentageOffset,
double? badgePositionPercentageOffset,
}) {
return PieChartSectionData(
value: value ?? this.value,
color: color ?? this.color,
gradient: gradient ?? this.gradient,
radius: radius ?? this.radius,
showTitle: showTitle ?? this.showTitle,
titleStyle: titleStyle ?? this.titleStyle,
title: title ?? this.title,
borderSide: borderSide ?? this.borderSide,
badgeWidget: badgeWidget ?? this.badgeWidget,
titlePositionPercentageOffset:
titlePositionPercentageOffset ?? this.titlePositionPercentageOffset,
badgePositionPercentageOffset:
badgePositionPercentageOffset ?? this.badgePositionPercentageOffset,
);
}