copyWith method
PlacesResponse
copyWith({
- List<
Place> ? places, - List<
RoutingSummary> ? routingSummaries, - List<
ContextualContent> ? contextualContents, - String? nextPageToken,
- String? searchUri,
Implementation
PlacesResponse copyWith({
List<Place>? places,
List<RoutingSummary>? routingSummaries,
List<ContextualContent>? contextualContents,
String? nextPageToken,
String? searchUri,
}) {
return PlacesResponse(
places: ((places?.isNotEmpty ?? false) ? places : null) ?? this.places,
routingSummaries:
((routingSummaries?.isNotEmpty ?? false) ? routingSummaries : null) ??
this.routingSummaries,
contextualContents:
((contextualContents?.isNotEmpty ?? false)
? contextualContents
: null) ??
this.contextualContents,
nextPageToken: nextPageToken ?? this.nextPageToken,
searchUri: searchUri ?? this.searchUri,
);
}