copyWith method Null safety

Circle copyWith(
  1. {bool? consumeTapEventsParam,
  2. Color? fillColorParam,
  3. LatLng? centerParam,
  4. double? radiusParam,
  5. Color? strokeColorParam,
  6. int? strokeWidthParam,
  7. bool? visibleParam,
  8. int? zIndexParam,
  9. VoidCallback? onTapParam}
)

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

Implementation

Circle copyWith({
  bool? consumeTapEventsParam,
  Color? fillColorParam,
  LatLng? centerParam,
  double? radiusParam,
  Color? strokeColorParam,
  int? strokeWidthParam,
  bool? visibleParam,
  int? zIndexParam,
  VoidCallback? onTapParam,
}) {
  return Circle(
    circleId: circleId,
    consumeTapEvents: consumeTapEventsParam ?? consumeTapEvents,
    fillColor: fillColorParam ?? fillColor,
    center: centerParam ?? center,
    radius: radiusParam ?? radius,
    strokeColor: strokeColorParam ?? strokeColor,
    strokeWidth: strokeWidthParam ?? strokeWidth,
    visible: visibleParam ?? visible,
    zIndex: zIndexParam ?? zIndex,
    onTap: onTapParam ?? onTap,
  );
}