onAccessDenied property
Called whenever camera access permission is denied by the user.
Return true
to retry, else false
. Not setting this callback, will automatically never retry.
Careful when retrying, this permission could have been rejected automatically, if you keep trying then it will silently spam the permission in a cycle. The error
given can be useful to check this.
Another approach would be to request the permission preemptively, before creating this widget, so it will never be needed to handle it here.
Implementation
final bool? Function(CameraException error, CameraController controller)?
onAccessDenied;