i have problem with geolocator package, when i run my app in debug mode everything works well but when i build the app and use the release mode it stuck in my loading screen which have the getcurrentlocation from geolocator package.
Future<void> getCurrentLocation() async {
try {
Geolocator geolocator = Geolocator()..forceAndroidLocationManager = true;
Position position = await geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.low,
);
latitude = position.latitude;
longitude = position.longitude;
} catch (e) {
print(e);
}
}
and also add to android manifest access.