copyWith method

PieChartSectionData copyWith({
  1. double? value,
  2. Color? color,
  3. Gradient? gradient,
  4. double? radius,
  5. bool? showTitle,
  6. TextStyle? titleStyle,
  7. String? title,
  8. BorderSide? borderSide,
  9. Widget? badgeWidget,
  10. double? titlePositionPercentageOffset,
  11. double? badgePositionPercentageOffset,
})

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,
  );
}