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