copyWith method
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? servesCocktails,
- bool? servesDessert,
- bool? servesCoffee,
- bool? goodForChildren,
- bool? allowsDogs,
- bool? restroom,
- bool? goodForGroups,
- bool? goodForWatchingSports,
- AccessibilityOptions? accessibilityOptions,
- 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,
);
}