Open hulum-io opened 2 weeks ago
Hello!
The boolean permission isn’t about "Approximate" or "Precise" but rather about states like "Granted," "Limited," "Denied," "Restricted," and "Permanently Denied."
Here’s a quick overview in code form:
const kPermissionStateToBool = {
PermissionStatus.granted: true,
PermissionStatus.limited: true,
PermissionStatus.denied: false,
PermissionStatus.restricted: false,
PermissionStatus.permanentlyDenied: false,
};
You can review this in detail by downloading the custom code in /lib/flutter_flow/permissions_util.dart
.
So, if the app is opened with the permission set to "Only this time," it’s classified as "Restricted" and therefore treated as false
.
Hope this helps clarify!
I selected “approximate” and “while using this app” it returns the approximate LatLng value but the boolean return value is false. Is there any other way in flutterflow to check whether a permission is granted or not? If I select “approximate” and “Only this time” it returns true.
This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.
Hey @hulum-io,
Thank you for flagging this, and apologies for the delay in getting back to you! I’ve been able to confirm the issue you described and will forward it to the engineering team so they can take a closer look.
Appreciate your patience!
hi @rzambroni, Distance calculation was one of the main functionalities of my app, and it worked perfectly before the October update. However, I had no choice but to remove this feature and move forward. I have already updated the privacy policy and information regarding location usage on both Google Play and the Apple App Store to reflect this change. I will reintegrate the feature in the future. Thank you for addressing the issue.
Can we access your project?
Current Behavior
It correctly returns "True" for precise location permissions. It incorrectly returns "False" when approximate permissions are granted. If permission is denied, the page gets stuck in a loading state and does not update.
Expected Behavior
Return "True" for both precise and approximate permissions. Return "False" if permission is denied.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
ITESz/Hqx89gobQF+c+MKfpQhQIgQ0QnU7gnlO1ucx40B77nBLApOs7BaUNKTdPiewhYJla0kkQ0wcL1jezEUscEFwquGbpM0JVAegrMXkW6brq2CriWf3EmL91hC2680cKnriVRBMp2c3gF1Ga1N63qNleeY8aSfxBlZ7vfcPo=
Visual documentation
Environment
Additional Information
No response