copyWith method
Creates a new Polygon object whose values are the same as this instance, unless overwritten by the specified parameters.
Implementation
Polygon copyWith({
bool? consumeTapEventsParam,
List<LatLng>? pointsParam,
Color? strokeColorParam,
Color? fillColorParam,
int? strokeWidthParam,
bool? visibleParam,
int? zIndexParam,
VoidCallback? onTapParam,
}) {
return Polygon(
polygonId: polygonId,
consumeTapEvents: consumeTapEventsParam ?? consumeTapEvents,
points: pointsParam ?? points,
strokeColor: strokeColorParam ?? strokeColor,
fillColor: fillColorParam ?? fillColor,
strokeWidth: strokeWidthParam ?? strokeWidth,
visible: visibleParam ?? visible,
zIndex: zIndexParam ?? zIndex,
onTap: onTapParam ?? onTap,
);
}