copyWith method

Polygon copyWith(
  1. {bool consumeTapEventsParam,
  2. Color fillColorParam,
  3. bool geodesicParam,
  4. List<LatLng> pointsParam,
  5. Color strokeColorParam,
  6. int strokeWidthParam,
  7. bool visibleParam,
  8. int zIndexParam,
  9. VoidCallback onTapParam}

Creates a new Polygon object whose values are the same as this instance, unless overwritten by the specified parameters.


Polygon copyWith({
  bool consumeTapEventsParam,
  Color fillColorParam,
  bool geodesicParam,
  List<LatLng> pointsParam,
  Color strokeColorParam,
  int strokeWidthParam,
  bool visibleParam,
  int zIndexParam,
  VoidCallback onTapParam,
}) {
  return Polygon(
    polygonId: polygonId,
    consumeTapEvents: consumeTapEventsParam ?? consumeTapEvents,
    fillColor: fillColorParam ?? fillColor,
    geodesic: geodesicParam ?? geodesic,
    points: pointsParam ?? points,
    strokeColor: strokeColorParam ?? strokeColor,
    strokeWidth: strokeWidthParam ?? strokeWidth,
    visible: visibleParam ?? visible,
    onTap: onTapParam ?? onTap,
    zIndex: zIndexParam ?? zIndex,