Why would Flutter/Dart fail to read GPS EXIF data from an image that clearly has latitude and longitude in Windows properties? Is this a limitation of the EXIF package, a problem with the image picker returning a stripped copy, or an issue with how GPS tags are stored in the image? How to reliably extract GPS latitude/longitude in Flutter? Whether I should use a different package or a different import approach?
> How to debug what EXIF data Flutter is actually receiving
I’m building a Flutter app that imports photos and reads EXIF metadata using Dart. The issue is that the same image clearly contains GPS data when I check it in Windows file properties, but my Flutter app cannot extract the latitude/longitude.
import 'dart:developer' as dev; import 'dart:io'; import 'package:native_exif/native_exif.dart'; class ExifService { Future<void> extractMetadata(String filePath) async { final file = File(filePath); final exif = await Exif.fromPath(filePath); final latLon = await exif.getLatLong(); print(latLon); final lat = await exif.getAttribute('GPSLatitude'); final lon = await exif.getAttribute('GPSLongitude'); print('lat=$lat lon=$lon'); await exif.close(); } }
I verified the photo metadata in:
Windows file properties, Phone photo details / gallery details, windows property with location inf
 Both show GPS latitude and longitude, so the metadata is definitely present in the file. But in Flutter, my EXIF reader returns: no GPS tags, or null, or 0/0 coordinates I’m using code like this: ``
I also tried manually parsing GPS EXIF strings, but the app still does not get the coordinates. What I have checkedThe image file definitely has GPS metadata in Windows properties. The file is a JPG/HEIC image with coordinates visible in the OS photo details. The file path exists and the file opens successfully in Flutter. EXIF extraction itself does not crash, but GPS data is missing or empty.