Update image_and_location_data.dart
This commit is contained in:
@@ -1,15 +1,51 @@
|
|||||||
class ImageAndLocationData {
|
class ImageAndLocationData {
|
||||||
final String? imagePath;
|
final String? imagePath;
|
||||||
final String? latitude;
|
final LocationData? locationData;
|
||||||
final String? longitude;
|
String? get latitude => locationData?.longitude;
|
||||||
final String? locationName;
|
String? get longitude => locationData?.longitude;
|
||||||
final String? subLocation;
|
String? get locationName => locationData?.locationName;
|
||||||
|
String? get subLocation => locationData?.subLocation;
|
||||||
|
|
||||||
ImageAndLocationData({
|
ImageAndLocationData({
|
||||||
required this.imagePath,
|
required this.imagePath,
|
||||||
|
required this.locationData,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
class LocationData {
|
||||||
|
/// Latitude value of the current location as a string.
|
||||||
|
|
||||||
|
final String? latitude;
|
||||||
|
|
||||||
|
/// Longitude value of the current location as a string.
|
||||||
|
|
||||||
|
final String? longitude;
|
||||||
|
|
||||||
|
/// Name of the current location as a string.
|
||||||
|
|
||||||
|
final String? locationName;
|
||||||
|
|
||||||
|
/// SubLocation of the current location as a string.
|
||||||
|
|
||||||
|
final String? subLocation;
|
||||||
|
|
||||||
|
LocationData({
|
||||||
required this.latitude,
|
required this.latitude,
|
||||||
required this.longitude,
|
required this.longitude,
|
||||||
required this.locationName,
|
required this.locationName,
|
||||||
required this.subLocation,
|
required this.subLocation,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is LocationData &&
|
||||||
|
latitude == other.latitude &&
|
||||||
|
longitude == other.longitude &&
|
||||||
|
locationName == other.locationName &&
|
||||||
|
subLocation == other.subLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
Object.hash(latitude, longitude, locationName, subLocation);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user