copyWith method
Landmark
copyWith({
- String? name,
- String? placeId,
- LocalizedText? displayName,
- List<
PlaceType> ? types, - SpatialRelationship? spatialRelationship,
- double? straightLineDistanceMeters,
- double? travelDistanceMeters,
Implementation
Landmark copyWith({
String? name,
String? placeId,
LocalizedText? displayName,
List<PlaceType>? types,
SpatialRelationship? spatialRelationship,
double? straightLineDistanceMeters,
double? travelDistanceMeters,
}) {
return Landmark(
name: name ?? this.name,
placeId: placeId ?? this.placeId,
displayName: displayName ?? this.displayName,
types: ((types?.isNotEmpty ?? false) ? types : null) ?? this.types,
spatialRelationship: spatialRelationship ?? this.spatialRelationship,
straightLineDistanceMeters:
straightLineDistanceMeters ?? this.straightLineDistanceMeters,
travelDistanceMeters: travelDistanceMeters ?? this.travelDistanceMeters,
);
}