copyWith method

MFPolygon copyWith({
  1. bool? consumeTapEventsParam,
  2. Color? fillColorParam,
  3. List<MFLatLng>? pointsParam,
  4. List<List<MFLatLng>>? holesParam,
  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.

Implementation

MFPolygon copyWith({
  bool? consumeTapEventsParam,
  Color? fillColorParam,
  List<MFLatLng>? pointsParam,
  List<List<MFLatLng>>? holesParam,
  Color? strokeColorParam,
  int? strokeWidthParam,
  bool? visibleParam,
  int? zIndexParam,
  VoidCallback? onTapParam,
}) {
  return MFPolygon(
    polygonId: polygonId,
    consumeTapEvents: consumeTapEventsParam ?? consumeTapEvents,
    fillColor: fillColorParam ?? fillColor,
    points: pointsParam ?? points,
    holes: holesParam ?? holes,
    strokeColor: strokeColorParam ?? strokeColor,
    strokeWidth: strokeWidthParam ?? strokeWidth,
    visible: visibleParam ?? visible,
    onTap: onTapParam ?? onTap,
    zIndex: zIndexParam ?? zIndex,
  );
}