I am trying to get the location of an image in flutter. I tried getting the lat and long from the image using the native_exif package.However it returns null for getLatLong() for an image, even when the image has a location tag.
final exif = await Exif.fromPath(file.path);
final latLong = await exif.getLatLong();
await exif.close();
When I print the exif I get the following keys as 0, GPS GPSLatitude: [0/0, 0/0, 0/0], GPS GPSAltitude: 0/0, GPS GPSLatitudeRef: , GPS GPSSpeed: 0/0, GPS GPSAltitudeRef: 0, GPS GPSProcessingMethod: , GPS GPSSpeedRef: , GPS GPSVersionID: [0, 0, 0, 0], GPS GPSLongitudeRef: , GPS GPSTimeStamp: [0/0, 0/0, 0/0], GPS GPSLongitude: [0/0, 0/0, 0/0]