copyWith method

Place copyWith({
  1. String? name,
  2. String? id,
  3. LocalizedText? displayName,
  4. List<PlaceType>? types,
  5. PlaceType? primaryType,
  6. LocalizedText? primaryTypeDisplayName,
  7. String? nationalPhoneNumber,
  8. String? internationalPhoneNumber,
  9. String? formattedAddress,
  10. String? shortFormattedAddress,
  11. List<AddressComponent>? addressComponents,
  12. PlusCode? plusCode,
  13. LatLng? location,
  14. Viewport? viewport,
  15. double? rating,
  16. String? googleMapsUri,
  17. String? websiteUri,
  18. List<Review>? reviews,
  19. OpeningHours? regularOpeningHours,
  20. List<Photo>? photos,
  21. String? adrFormatAddress,
  22. BusinessStatus? businessStatus,
  23. PriceLevel? priceLevel,
  24. List<Attribution>? attributions,
  25. String? iconMaskBaseUri,
  26. String? iconBackgroundColor,
  27. OpeningHours? currentOpeningHours,
  28. List<OpeningHours>? currentSecondaryOpeningHours,
  29. List<OpeningHours>? regularSecondaryOpeningHours,
  30. LocalizedText? editorialSummary,
  31. PaymentOptions? paymentOptions,
  32. ParkingOptions? parkingOptions,
  33. List<SubDestination>? subDestinations,
  34. FuelOptions? fuelOptions,
  35. EVChargeOptions? evChargeOptions,
  36. GenerativeSummary? generativeSummary,
  37. AreaSummary? areaSummary,
  38. List<ContainingPlace>? containingPlaces,
  39. AddressDescriptor? addressDescriptor,
  40. GoogleMapsLinks? googleMapsLinks,
  41. PriceRange? priceRange,
  42. int? utcOffsetMinutes,
  43. int? userRatingCount,
  44. bool? takeout,
  45. bool? delivery,
  46. bool? dineIn,
  47. bool? curbsidePickup,
  48. bool? reservable,
  49. bool? servesBreakfast,
  50. bool? servesLunch,
  51. bool? servesDinner,
  52. bool? servesBeer,
  53. bool? servesWine,
  54. bool? servesBrunch,
  55. bool? servesVegetarianFood,
  56. bool? outdoorSeating,
  57. bool? liveMusic,
  58. bool? menuForChildren,
  59. bool? servesCocktails,
  60. bool? servesDessert,
  61. bool? servesCoffee,
  62. bool? goodForChildren,
  63. bool? allowsDogs,
  64. bool? restroom,
  65. bool? goodForGroups,
  66. bool? goodForWatchingSports,
  67. AccessibilityOptions? accessibilityOptions,
  68. bool? pureServiceAreaBusiness,
})

Implementation

Place copyWith({
  String? name,
  String? id,
  LocalizedText? displayName,
  List<PlaceType>? types,
  PlaceType? primaryType,
  LocalizedText? primaryTypeDisplayName,
  String? nationalPhoneNumber,
  String? internationalPhoneNumber,
  String? formattedAddress,
  String? shortFormattedAddress,
  List<AddressComponent>? addressComponents,
  PlusCode? plusCode,
  LatLng? location,
  Viewport? viewport,
  double? rating,
  String? googleMapsUri,
  String? websiteUri,
  List<Review>? reviews,
  OpeningHours? regularOpeningHours,
  List<Photo>? photos,
  String? adrFormatAddress,
  BusinessStatus? businessStatus,
  PriceLevel? priceLevel,
  List<Attribution>? attributions,
  String? iconMaskBaseUri,
  String? iconBackgroundColor,
  OpeningHours? currentOpeningHours,
  List<OpeningHours>? currentSecondaryOpeningHours,
  List<OpeningHours>? regularSecondaryOpeningHours,
  LocalizedText? editorialSummary,
  PaymentOptions? paymentOptions,
  ParkingOptions? parkingOptions,
  List<SubDestination>? subDestinations,
  FuelOptions? fuelOptions,
  EVChargeOptions? evChargeOptions,
  GenerativeSummary? generativeSummary,
  AreaSummary? areaSummary,
  List<ContainingPlace>? containingPlaces,
  AddressDescriptor? addressDescriptor,
  GoogleMapsLinks? googleMapsLinks,
  PriceRange? priceRange,
  int? utcOffsetMinutes,
  int? userRatingCount,
  bool? takeout,
  bool? delivery,
  bool? dineIn,
  bool? curbsidePickup,
  bool? reservable,
  bool? servesBreakfast,
  bool? servesLunch,
  bool? servesDinner,
  bool? servesBeer,
  bool? servesWine,
  bool? servesBrunch,
  bool? servesVegetarianFood,
  bool? outdoorSeating,
  bool? liveMusic,
  bool? menuForChildren,
  bool? servesCocktails,
  bool? servesDessert,
  bool? servesCoffee,
  bool? goodForChildren,
  bool? allowsDogs,
  bool? restroom,
  bool? goodForGroups,
  bool? goodForWatchingSports,
  AccessibilityOptions? accessibilityOptions,
  bool? pureServiceAreaBusiness,
}) {
  return Place(
    name: name ?? this.name,
    id: id ?? this.id,
    displayName: displayName ?? this.displayName,
    types: ((types?.isNotEmpty ?? false) ? types : null) ?? this.types,
    primaryType: primaryType ?? this.primaryType,
    primaryTypeDisplayName:
        primaryTypeDisplayName ?? this.primaryTypeDisplayName,
    nationalPhoneNumber: nationalPhoneNumber ?? this.nationalPhoneNumber,
    internationalPhoneNumber:
        internationalPhoneNumber ?? this.internationalPhoneNumber,
    formattedAddress: formattedAddress ?? this.formattedAddress,
    shortFormattedAddress:
        shortFormattedAddress ?? this.shortFormattedAddress,
    addressComponents:
        ((addressComponents?.isNotEmpty ?? false)
            ? addressComponents
            : null) ??
        this.addressComponents,
    plusCode: plusCode ?? this.plusCode,
    location: location ?? this.location,
    viewport: viewport ?? this.viewport,
    rating: rating ?? this.rating,
    googleMapsUri: googleMapsUri ?? this.googleMapsUri,
    websiteUri: websiteUri ?? this.websiteUri,
    reviews:
        ((reviews?.isNotEmpty ?? false) ? reviews : null) ?? this.reviews,
    regularOpeningHours: regularOpeningHours ?? this.regularOpeningHours,
    photos: ((photos?.isNotEmpty ?? false) ? photos : null) ?? this.photos,
    adrFormatAddress: adrFormatAddress ?? this.adrFormatAddress,
    businessStatus: businessStatus ?? this.businessStatus,
    priceLevel: priceLevel ?? this.priceLevel,
    attributions:
        ((attributions?.isNotEmpty ?? false) ? attributions : null) ??
        this.attributions,
    iconMaskBaseUri: iconMaskBaseUri ?? this.iconMaskBaseUri,
    iconBackgroundColor: iconBackgroundColor ?? this.iconBackgroundColor,
    currentOpeningHours: currentOpeningHours ?? this.currentOpeningHours,
    currentSecondaryOpeningHours:
        ((currentSecondaryOpeningHours?.isNotEmpty ?? false)
            ? currentSecondaryOpeningHours
            : null) ??
        this.currentSecondaryOpeningHours,
    regularSecondaryOpeningHours:
        ((regularSecondaryOpeningHours?.isNotEmpty ?? false)
            ? regularSecondaryOpeningHours
            : null) ??
        this.regularSecondaryOpeningHours,
    editorialSummary: editorialSummary ?? this.editorialSummary,
    paymentOptions: paymentOptions ?? this.paymentOptions,
    parkingOptions: parkingOptions ?? this.parkingOptions,
    subDestinations:
        ((subDestinations?.isNotEmpty ?? false) ? subDestinations : null) ??
        this.subDestinations,
    fuelOptions: fuelOptions ?? this.fuelOptions,
    evChargeOptions: evChargeOptions ?? this.evChargeOptions,
    generativeSummary: generativeSummary ?? this.generativeSummary,
    areaSummary: areaSummary ?? this.areaSummary,
    containingPlaces:
        ((containingPlaces?.isNotEmpty ?? false) ? containingPlaces : null) ??
        this.containingPlaces,
    addressDescriptor: addressDescriptor ?? this.addressDescriptor,
    googleMapsLinks: googleMapsLinks ?? this.googleMapsLinks,
    priceRange: priceRange ?? this.priceRange,
    utcOffsetMinutes: utcOffsetMinutes ?? this.utcOffsetMinutes,
    userRatingCount: userRatingCount ?? this.userRatingCount,
    takeout: takeout ?? this.takeout,
    delivery: delivery ?? this.delivery,
    dineIn: dineIn ?? this.dineIn,
    curbsidePickup: curbsidePickup ?? this.curbsidePickup,
    reservable: reservable ?? this.reservable,
    servesBreakfast: servesBreakfast ?? this.servesBreakfast,
    servesLunch: servesLunch ?? this.servesLunch,
    servesDinner: servesDinner ?? this.servesDinner,
    servesBeer: servesBeer ?? this.servesBeer,
    servesWine: servesWine ?? this.servesWine,
    servesBrunch: servesBrunch ?? this.servesBrunch,
    servesVegetarianFood: servesVegetarianFood ?? this.servesVegetarianFood,
    outdoorSeating: outdoorSeating ?? this.outdoorSeating,
    liveMusic: liveMusic ?? this.liveMusic,
    menuForChildren: menuForChildren ?? this.menuForChildren,
    servesCocktails: servesCocktails ?? this.servesCocktails,
    servesDessert: servesDessert ?? this.servesDessert,
    servesCoffee: servesCoffee ?? this.servesCoffee,
    goodForChildren: goodForChildren ?? this.goodForChildren,
    allowsDogs: allowsDogs ?? this.allowsDogs,
    restroom: restroom ?? this.restroom,
    goodForGroups: goodForGroups ?? this.goodForGroups,
    goodForWatchingSports:
        goodForWatchingSports ?? this.goodForWatchingSports,
    accessibilityOptions: accessibilityOptions ?? this.accessibilityOptions,
    pureServiceAreaBusiness:
        pureServiceAreaBusiness ?? this.pureServiceAreaBusiness,
  );
}