rmtmckenzie/flutter_qr_mobile_vision

[Feature request] Opt-out of permission handling

itsJoKr opened this issue · 2 comments

For a good user experience, handling the permission is never just that one native permission dialog.
It would also include some UI when you deny, and a different UI when it's permanently denied that will help the user to open the settings, usually with some nice graphics...

It's almost impossible to build this kind of experience because this package will control permissions. Two biggest problems I've encountered:

  1. When I ask for permission, the package will also react to callback and ask for permission for some reason.
  2. When the user denies the permission I will get an onError, but I don't get info if the user denied or permanently denied so I cannot show appropriate UI (without asking for permission again by myself).

I think the easiest thing would be a parameter, something like QrCamera(dontHandlePermissions: true) that will let me handle the permissions as I want them.

What do you think?

Updates here?

I don't currently have much time to spend working on this, but would gladly accept a PR. Realistically, I put the permissions handling in just as a stop-gap and it was never really intended to be an all-round solution (and when I first made this, there was no good flutter alternative).

Can you elaborate on your first point? What exactly is going on there, this plugin is doing something with the permissions even though you used something external to request them?

What I'd recommend is using a different plugin for permission handling as they should allow you to do things like see if it has been permanently denied, before using this plugin. If there are compatibility issues that would definitely be something I'd like to fix though, and maybe I should be taking out the permission stuff entirely.