copyWith method

SpiderChartThemeData copyWith({
  1. Color? gridLineColor,
  2. Color? gridDashedLineColor,
  3. Color? spokeLineColor,
  4. Color? dataLineColor,
  5. Color? dataFillColor,
  6. bool? useGradient,
  7. List<Color>? gradientColors,
  8. List<Color>? dataLineGradientColors,
  9. List<Color>? gridLineGradientColors,
  10. List<Color>? centerCircleGradientColors,
  11. Color? centerCircleColor,
  12. TextStyle? labelStyle,
  13. TextStyle? selectedLabelStyle,
  14. bool? showSelectedLabel,
  15. bool? showTitleSelectedLabel,
  16. TitleLabelMode? titleLabelMode,
  17. TitleLabelBehavior? titleLabelBehavior,
  18. double? titleSlideSpace,
  19. bool? enableTitleSlide,
  20. Duration? titleSlideDuration,
  21. Curve? titleSlideCurve,
  22. TextStyle? titleSelectedLabelStyle,
  23. double? titleSelectedLabelTopOffset,
  24. double? chartTopOffset,
  25. double? labelOffsetFromChart,
  26. double? labelRadiusFactor,
  27. double? bubbleOffset,
  28. double? strokeWidth,
  29. double? pointSize,
  30. Color? pointColor,
  31. bool? rotateToTop,
  32. Duration? rotationDuration,
  33. TriangleDirection? triangleDirection,
  34. bool? autoTriangleDirection,
  35. BubbleAnchor? bubbleAnchor,
  36. bool? useSpline,
  37. double? splineTension,
  38. double? bottomPadding,
  39. bool? autoHeightAdjustment,
})

Creates a copy of this theme but with the given fields replaced with the new values.

Implementation

SpiderChartThemeData copyWith({
  Color? gridLineColor,
  Color? gridDashedLineColor,
  Color? spokeLineColor,
  Color? dataLineColor,
  Color? dataFillColor,
  bool? useGradient,
  List<Color>? gradientColors,
  List<Color>? dataLineGradientColors,
  List<Color>? gridLineGradientColors,
  List<Color>? centerCircleGradientColors,
  Color? centerCircleColor,
  TextStyle? labelStyle,
  TextStyle? selectedLabelStyle,
  bool? showSelectedLabel,
  bool? showTitleSelectedLabel,
  TitleLabelMode? titleLabelMode,
  TitleLabelBehavior? titleLabelBehavior,
  double? titleSlideSpace,
  bool? enableTitleSlide,
  Duration? titleSlideDuration,
  Curve? titleSlideCurve,
  TextStyle? titleSelectedLabelStyle,
  double? titleSelectedLabelTopOffset,
  double? chartTopOffset,
  double? labelOffsetFromChart,
  double? labelRadiusFactor,
  double? bubbleOffset,
  double? strokeWidth,
  double? pointSize,
  Color? pointColor,
  bool? rotateToTop,
  Duration? rotationDuration,
  TriangleDirection? triangleDirection,
  bool? autoTriangleDirection,
  BubbleAnchor? bubbleAnchor,
  bool? useSpline,
  double? splineTension,
  double? bottomPadding,
  bool? autoHeightAdjustment,
}) {
  final resolvedTitleLabelMode = showTitleSelectedLabel != null
      ? (showTitleSelectedLabel
          ? TitleLabelMode.shown
          : TitleLabelMode.hidden)
      : titleLabelMode ?? this.titleLabelMode;

  return SpiderChartThemeData(
    gridLineColor: gridLineColor ?? this.gridLineColor,
    gridDashedLineColor: gridDashedLineColor ?? this.gridDashedLineColor,
    spokeLineColor: spokeLineColor ?? this.spokeLineColor,
    dataLineColor: dataLineColor ?? this.dataLineColor,
    dataFillColor: dataFillColor ?? this.dataFillColor,
    useGradient: useGradient ?? this.useGradient,
    gradientColors: gradientColors ?? this.gradientColors,
    dataLineGradientColors:
        dataLineGradientColors ?? this.dataLineGradientColors,
    gridLineGradientColors:
        gridLineGradientColors ?? this.gridLineGradientColors,
    centerCircleGradientColors:
        centerCircleGradientColors ?? this.centerCircleGradientColors,
    centerCircleColor: centerCircleColor ?? this.centerCircleColor,
    labelStyle: labelStyle ?? this.labelStyle,
    selectedLabelStyle: selectedLabelStyle ?? this.selectedLabelStyle,
    showSelectedLabel: showSelectedLabel ?? this.showSelectedLabel,
    // ignore: deprecated_member_use_from_same_package
    showTitleSelectedLabel: resolvedTitleLabelMode == TitleLabelMode.shown,
    titleLabelMode: resolvedTitleLabelMode,
    titleLabelBehavior: titleLabelBehavior ?? this.titleLabelBehavior,
    titleSlideSpace: titleSlideSpace ?? this.titleSlideSpace,
    enableTitleSlide: enableTitleSlide ?? this.enableTitleSlide,
    titleSlideDuration: titleSlideDuration ?? this.titleSlideDuration,
    titleSlideCurve: titleSlideCurve ?? this.titleSlideCurve,
    titleSelectedLabelStyle:
        titleSelectedLabelStyle ?? this.titleSelectedLabelStyle,
    titleSelectedLabelTopOffset:
        titleSelectedLabelTopOffset ?? this.titleSelectedLabelTopOffset,
    chartTopOffset: chartTopOffset ?? this.chartTopOffset,
    labelOffsetFromChart: labelOffsetFromChart ?? this.labelOffsetFromChart,
    labelRadiusFactor: labelRadiusFactor ?? this.labelRadiusFactor,
    bubbleOffset: bubbleOffset ?? this.bubbleOffset,
    strokeWidth: strokeWidth ?? this.strokeWidth,
    pointSize: pointSize ?? this.pointSize,
    pointColor: pointColor ?? this.pointColor,
    rotateToTop: rotateToTop ?? this.rotateToTop,
    rotationDuration: rotationDuration ?? this.rotationDuration,
    triangleDirection: triangleDirection ?? this.triangleDirection,
    autoTriangleDirection:
        autoTriangleDirection ?? this.autoTriangleDirection,
    bubbleAnchor: bubbleAnchor ?? this.bubbleAnchor,
    useSpline: useSpline ?? this.useSpline,
    bottomPadding: bottomPadding ?? this.bottomPadding,
    autoHeightAdjustment: autoHeightAdjustment ?? this.autoHeightAdjustment,
  );
}