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,
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,
);
}