copyWith method
PlacePrediction
copyWith({
- String? place,
- String? placeId,
- FormattableText? text,
- StructuredFormat? structuredFormat,
- List<
PlaceType> ? types, - int? distanceMeters,
Implementation
PlacePrediction copyWith({
String? place,
String? placeId,
FormattableText? text,
StructuredFormat? structuredFormat,
List<PlaceType>? types,
int? distanceMeters,
}) {
return PlacePrediction(
place: place ?? this.place,
placeId: placeId ?? this.placeId,
text: text ?? this.text,
structuredFormat: structuredFormat ?? this.structuredFormat,
types: ((types?.isNotEmpty ?? false) ? types : null) ?? this.types,
distanceMeters: distanceMeters ?? this.distanceMeters,
);
}