copyWith method

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

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

Implementation

Polygon copyWith({
  bool? consumeTapEventsParam,
  Color? fillColorParam,
  bool? geodesicParam,
  List<LatLng>? pointsParam,
  List<List<LatLng>>? holesParam,
  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,
    holes: holesParam ?? holes,
    strokeColor: strokeColorParam ?? strokeColor,
    strokeWidth: strokeWidthParam ?? strokeWidth,
    visible: visibleParam ?? visible,
    onTap: onTapParam ?? onTap,
    zIndex: zIndexParam ?? zIndex,
  );
}