copyWith method

SlidableLineChartThemeData<E> copyWith({
  1. List<CoordinatesStyle<E>>? coordinatesStyleList,
  2. TextStyle? axisLabelStyle,
  3. Color? axisLineColor,
  4. double? axisLineWidth,
  5. Color? gridLineColor,
  6. double? gridLineWidth,
  7. DrawGridLineType? drawGridLineType,
  8. DrawGridLineStyle? drawGridLineStyle,
  9. double? dashedGridLineWidth,
  10. double? dashedGridLineGap,
  11. bool? showTapArea,
  12. double? lineWidth,
  13. TextStyle? displayValueTextStyle,
  14. double? displayValueMarginBottom,
  15. double? indicatorMarginTop,
  16. double? indicatorRadius,
  17. Color? checkBackgroundColor,
  18. Color? closeBackgroundColor,
  19. Color? checkColor,
  20. Color? closeColor,
  21. double? smooth,
  22. double? disabledOpacity,
})

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

Implementation

SlidableLineChartThemeData<E> copyWith({
  List<CoordinatesStyle<E>>? coordinatesStyleList,
  TextStyle? axisLabelStyle,
  Color? axisLineColor,
  double? axisLineWidth,
  Color? gridLineColor,
  double? gridLineWidth,
  DrawGridLineType? drawGridLineType,
  DrawGridLineStyle? drawGridLineStyle,
  double? dashedGridLineWidth,
  double? dashedGridLineGap,
  bool? showTapArea,
  double? lineWidth,
  TextStyle? displayValueTextStyle,
  double? displayValueMarginBottom,
  double? indicatorMarginTop,
  double? indicatorRadius,
  Color? checkBackgroundColor,
  Color? closeBackgroundColor,
  Color? checkColor,
  Color? closeColor,
  double? smooth,
  double? disabledOpacity,
}) {
  assert(
    smooth == null || (smooth >= 0.0 && smooth <= 1.0),
    'smooth($smooth) must be between [0-1]',
  );
  assert(
    disabledOpacity == null ||
        (disabledOpacity >= 0.0 && disabledOpacity <= 1.0),
    'disabledOpacity($disabledOpacity) must be between [0-1]',
  );

  return SlidableLineChartThemeData<E>(
    coordinatesStyleList: coordinatesStyleList ?? this.coordinatesStyleList,
    drawGridLineType: drawGridLineType ?? this.drawGridLineType,
    drawGridLineStyle: drawGridLineStyle ?? this.drawGridLineStyle,
    dashedGridLineWidth: dashedGridLineWidth ?? this.dashedGridLineWidth,
    dashedGridLineGap: dashedGridLineGap ?? this.dashedGridLineGap,
    axisLabelStyle: axisLabelStyle ?? this.axisLabelStyle,
    axisLineColor: axisLineColor ?? this.axisLineColor,
    axisLineWidth: axisLineWidth ?? this.axisLineWidth,
    gridLineColor: gridLineColor ?? this.gridLineColor,
    gridLineWidth: gridLineWidth ?? this.gridLineWidth,
    showTapArea: showTapArea ?? this.showTapArea,
    lineWidth: lineWidth ?? this.lineWidth,
    displayValueTextStyle:
        displayValueTextStyle ?? this.displayValueTextStyle,
    displayValueMarginBottom:
        displayValueMarginBottom ?? this.displayValueMarginBottom,
    indicatorMarginTop: indicatorMarginTop ?? this.indicatorMarginTop,
    indicatorRadius: indicatorRadius ?? this.indicatorRadius,
    checkBackgroundColor: checkBackgroundColor ?? this.checkBackgroundColor,
    closeBackgroundColor: closeBackgroundColor ?? this.closeBackgroundColor,
    checkColor: checkColor ?? this.checkColor,
    closeColor: closeColor ?? this.closeColor,
    smooth: smooth ?? this.smooth,
    disabledOpacity: disabledOpacity ?? this.disabledOpacity,
  );
}