copyWith method

SfMapsThemeData copyWith({
  1. Brightness? brightness,
  2. Color? layerColor,
  3. Color? layerStrokeColor,
  4. double? layerStrokeWidth,
  5. Color? shapeHoverColor,
  6. Color? shapeHoverStrokeColor,
  7. double? shapeHoverStrokeWidth,
  8. TextStyle? legendTextStyle,
  9. Color? markerIconColor,
  10. Color? markerIconStrokeColor,
  11. double? markerIconStrokeWidth,
  12. TextStyle? dataLabelTextStyle,
  13. Color? bubbleColor,
  14. Color? bubbleStrokeColor,
  15. double? bubbleStrokeWidth,
  16. Color? bubbleHoverColor,
  17. Color? bubbleHoverStrokeColor,
  18. double? bubbleHoverStrokeWidth,
  19. Color? selectionColor,
  20. Color? selectionStrokeColor,
  21. double? selectionStrokeWidth,
  22. Color? tooltipColor,
  23. Color? tooltipStrokeColor,
  24. double? tooltipStrokeWidth,
  25. BorderRadiusGeometry? tooltipBorderRadius,
  26. Color? toggledItemColor,
  27. Color? toggledItemStrokeColor,
  28. double? toggledItemStrokeWidth,
})

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

Implementation

SfMapsThemeData copyWith({
  Brightness? brightness,
  Color? layerColor,
  Color? layerStrokeColor,
  double? layerStrokeWidth,
  Color? shapeHoverColor,
  Color? shapeHoverStrokeColor,
  double? shapeHoverStrokeWidth,
  TextStyle? legendTextStyle,
  Color? markerIconColor,
  Color? markerIconStrokeColor,
  double? markerIconStrokeWidth,
  TextStyle? dataLabelTextStyle,
  Color? bubbleColor,
  Color? bubbleStrokeColor,
  double? bubbleStrokeWidth,
  Color? bubbleHoverColor,
  Color? bubbleHoverStrokeColor,
  double? bubbleHoverStrokeWidth,
  Color? selectionColor,
  Color? selectionStrokeColor,
  double? selectionStrokeWidth,
  Color? tooltipColor,
  Color? tooltipStrokeColor,
  double? tooltipStrokeWidth,
  BorderRadiusGeometry? tooltipBorderRadius,
  Color? toggledItemColor,
  Color? toggledItemStrokeColor,
  double? toggledItemStrokeWidth,
}) {
  return SfMapsThemeData.raw(
    brightness: brightness,
    layerColor: layerColor ?? this.layerColor,
    layerStrokeColor: layerStrokeColor ?? this.layerStrokeColor,
    layerStrokeWidth: layerStrokeWidth ?? this.layerStrokeWidth,
    shapeHoverColor: shapeHoverColor ?? this.shapeHoverColor,
    shapeHoverStrokeColor:
        shapeHoverStrokeColor ?? this.shapeHoverStrokeColor,
    shapeHoverStrokeWidth:
        shapeHoverStrokeWidth ?? this.shapeHoverStrokeWidth,
    legendTextStyle: legendTextStyle ?? this.legendTextStyle,
    markerIconColor: markerIconColor ?? this.markerIconColor,
    markerIconStrokeColor:
        markerIconStrokeColor ?? this.markerIconStrokeColor,
    markerIconStrokeWidth:
        markerIconStrokeWidth ?? this.markerIconStrokeWidth,
    dataLabelTextStyle: dataLabelTextStyle ?? this.dataLabelTextStyle,
    bubbleColor: bubbleColor ?? this.bubbleColor,
    bubbleStrokeColor: bubbleStrokeColor ?? this.bubbleStrokeColor,
    bubbleStrokeWidth: bubbleStrokeWidth ?? this.bubbleStrokeWidth,
    bubbleHoverColor: bubbleHoverColor ?? this.bubbleHoverColor,
    bubbleHoverStrokeColor:
        bubbleHoverStrokeColor ?? this.bubbleHoverStrokeColor,
    bubbleHoverStrokeWidth:
        bubbleHoverStrokeWidth ?? this.bubbleHoverStrokeWidth,
    selectionColor: selectionColor ?? this.selectionColor,
    selectionStrokeColor: selectionStrokeColor ?? this.selectionStrokeColor,
    selectionStrokeWidth: selectionStrokeWidth ?? this.selectionStrokeWidth,
    tooltipColor: tooltipColor ?? this.tooltipColor,
    tooltipStrokeColor: tooltipStrokeColor ?? this.tooltipStrokeColor,
    tooltipStrokeWidth: tooltipStrokeWidth ?? this.tooltipStrokeWidth,
    tooltipBorderRadius: tooltipBorderRadius ?? this.tooltipBorderRadius,
    toggledItemColor: toggledItemColor ?? this.toggledItemColor,
    toggledItemStrokeColor:
        toggledItemStrokeColor ?? this.toggledItemStrokeColor,
    toggledItemStrokeWidth:
        toggledItemStrokeWidth ?? this.toggledItemStrokeWidth,
  );
}