copyWith method

Polygon copyWith({
  1. List<LatLng>? pointsParam,
  2. double? strokeWidthParam,
  3. Color? strokeColorParam,
  4. Color? fillColorParam,
  5. bool? visibleParam,
})

实际copy函数

Implementation

Polygon copyWith({
  List<LatLng>? pointsParam,
  double? strokeWidthParam,
  Color? strokeColorParam,
  Color? fillColorParam,
  bool? visibleParam,
}) {
  Polygon copyPolyline = Polygon(
    points: pointsParam ?? points,
    strokeWidth: strokeWidthParam ?? strokeWidth,
    strokeColor: strokeColorParam ?? strokeColor,
    fillColor: fillColorParam ?? fillColor,
    visible: visibleParam ?? visible,
    joinType: joinType,
  );
  copyPolyline.setIdForCopy(id);
  return copyPolyline;
}