Skip to content

Commit

Permalink
⚡️ Check Access rather than AccessDenied
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Feb 26, 2024
1 parent 42813bd commit a4e0e68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/states/camera_picker_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class CameraPickerState extends State<CameraPicker>
innerController = newController;
lock.complete();
} catch (e, s) {
accessDenied = e is CameraException && e.code.endsWith('AccessDenied');
accessDenied = e is CameraException && e.code.contains('Access');
if (!accessDenied) {
if (!retriedAfterInvalidInitialize) {
retriedAfterInvalidInitialize = true;
Expand Down

0 comments on commit a4e0e68

Please sign in to comment.