copyWith method

AreaOptions copyWith({
  1. List<List<LatLng>>? holePointsList,
  2. Color? color,
  3. double? borderStrokeWidth,
  4. Color? borderColor,
  5. bool? disableHolesBorder,
  6. bool? isDotted,
  7. bool? isFilled,
  8. StrokeCap? strokeCap,
  9. StrokeJoin? strokeJoin,
  10. String? label,
  11. TextStyle? labelStyle,
  12. PolygonLabelPlacement? labelPlacement,
  13. bool? rotateLabel,
})

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

Implementation

AreaOptions copyWith({
  List<List<LatLng>>? holePointsList,
  Color? color,
  double? borderStrokeWidth,
  Color? borderColor,
  bool? disableHolesBorder,
  bool? isDotted,
  bool? isFilled,
  StrokeCap? strokeCap,
  StrokeJoin? strokeJoin,
  String? label,
  TextStyle? labelStyle,
  PolygonLabelPlacement? labelPlacement,
  bool? rotateLabel,
}) {
  return AreaOptions(
    holePointsList: holePointsList ?? this.holePointsList,
    color: color ?? this.color,
    borderStrokeWidth: borderStrokeWidth ?? this.borderStrokeWidth,
    borderColor: borderColor ?? this.borderColor,
    disableHolesBorder: disableHolesBorder ?? this.disableHolesBorder,
    isDotted: isDotted ?? this.isDotted,
    isFilled: isFilled ?? this.isFilled,
    strokeCap: strokeCap ?? this.strokeCap,
    strokeJoin: strokeJoin ?? this.strokeJoin,
    label: label ?? this.label,
    labelStyle: labelStyle ?? this.labelStyle,
    labelPlacement: labelPlacement ?? this.labelPlacement,
    rotateLabel: rotateLabel ?? this.rotateLabel,
  );
}