Update image_and_location_data.dart

This commit is contained in:
ASHUTOSH AGARWAL
2024-04-18 11:16:39 +05:30
parent 3f262923b0
commit d153d259a9

View File

@@ -1,15 +1,51 @@
class ImageAndLocationData {
final String? imagePath;
final String? latitude;
final String? longitude;
final String? locationName;
final String? subLocation;
final LocationData? locationData;
String? get latitude => locationData?.longitude;
String? get longitude => locationData?.longitude;
String? get locationName => locationData?.locationName;
String? get subLocation => locationData?.subLocation;
ImageAndLocationData({
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.longitude,
required this.locationName,
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);
}