27 lines
549 B
Dart
27 lines
549 B
Dart
class MapsLinkMetadata {
|
|
final String url;
|
|
final String placeName;
|
|
final String latitude;
|
|
final String longitude;
|
|
final String address;
|
|
final String description;
|
|
|
|
const MapsLinkMetadata({
|
|
required this.url,
|
|
this.placeName = '',
|
|
this.latitude = '',
|
|
this.longitude = '',
|
|
this.address = '',
|
|
this.description = '',
|
|
});
|
|
|
|
String get coordinates {
|
|
if (hasCoordinates) {
|
|
return '$latitude, $longitude';
|
|
}
|
|
return '';
|
|
}
|
|
|
|
bool get hasCoordinates => latitude.isNotEmpty && longitude.isNotEmpty;
|
|
}
|