copyWith method

PlaceDetails copyWith({
  1. List<AddressComponent>? addressComponents,
  2. String? adrAddress,
  3. String? businessStatus,
  4. CurrentOpeningHours? currentOpeningHours,
  5. EditorialSummary? editorialSummary,
  6. String? formattedAddress,
  7. Geometry? geometry,
  8. String? icon,
  9. String? iconBackgroundColor,
  10. String? iconMaskBaseUri,
  11. String? name,
  12. OpeningHours? openingHours,
  13. List<Photo>? photos,
  14. String? placeId,
  15. PlusCode? plusCode,
  16. double? rating,
  17. String? reference,
  18. List<Review>? reviews,
  19. List<String>? types,
  20. String? url,
  21. int? userRatingsTotal,
  22. int? utcOffset,
  23. String? vicinity,
  24. String? website,
  25. bool? wheelchairAccessibleEntrance,
})

Implementation

PlaceDetails copyWith({
  List<AddressComponent>? addressComponents,
  String? adrAddress,
  String? businessStatus,
  CurrentOpeningHours? currentOpeningHours,
  EditorialSummary? editorialSummary,
  String? formattedAddress,
  Geometry? geometry,
  String? icon,
  String? iconBackgroundColor,
  String? iconMaskBaseUri,
  String? name,
  OpeningHours? openingHours,
  List<Photo>? photos,
  String? placeId,
  PlusCode? plusCode,
  double? rating,
  String? reference,
  List<Review>? reviews,
  List<String>? types,
  String? url,
  int? userRatingsTotal,
  int? utcOffset,
  String? vicinity,
  String? website,
  bool? wheelchairAccessibleEntrance,
}) {
  return PlaceDetails(
    addressComponents: addressComponents ?? this.addressComponents,
    adrAddress: adrAddress ?? this.adrAddress,
    businessStatus: businessStatus ?? this.businessStatus,
    currentOpeningHours: currentOpeningHours ?? this.currentOpeningHours,
    editorialSummary: editorialSummary ?? this.editorialSummary,
    formattedAddress: formattedAddress ?? this.formattedAddress,
    geometry: geometry ?? this.geometry,
    icon: icon ?? this.icon,
    iconBackgroundColor: iconBackgroundColor ?? this.iconBackgroundColor,
    iconMaskBaseUri: iconMaskBaseUri ?? this.iconMaskBaseUri,
    name: name ?? this.name,
    openingHours: openingHours ?? this.openingHours,
    photos: photos ?? this.photos,
    placeId: placeId ?? this.placeId,
    plusCode: plusCode ?? this.plusCode,
    rating: rating ?? this.rating,
    reference: reference ?? this.reference,
    reviews: reviews ?? this.reviews,
    types: types ?? this.types,
    url: url ?? this.url,
    userRatingsTotal: userRatingsTotal ?? this.userRatingsTotal,
    utcOffset: utcOffset ?? this.utcOffset,
    vicinity: vicinity ?? this.vicinity,
    website: website ?? this.website,
    wheelchairAccessibleEntrance:
        wheelchairAccessibleEntrance ?? this.wheelchairAccessibleEntrance,
  );
}