Handling permissions

Actions & Logic

Hello you all,

I have made local state to check if we already have the necessary permissions. This is false by default, and changed to true when user grants permission. App state is persistent

But it happens a lot of time that the permission popup comes automatically instead of after user clicking the required button and when users grants the permission in this case, the user still see those permission buttons (conditional) because the app state is still not updated.

What have you tried so far?

I tried updating the app state on page load, but it gives different errors on building

Error (Xcode): lib/pages/profile/profile_widget.dart:108:13: Error: 'await' can only be used in 'async' or 'async*' methods.

The permission logic is not even present in conditional rendering of the element.

What would be the correct way to handle this?

Thanks in advance!

Did you check FlutterFlow's Documentation for this topic?
No
1
3 replies