Skip to content

Commit

Permalink
[camera_web] Use CameraAccessDenied for permission error (flutter#5784)
Browse files Browse the repository at this point in the history
  • Loading branch information
hellohuanlin authored and mauricioluz committed Jan 26, 2023
1 parent e1e6e84 commit 44ec6c5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/camera/camera_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.0

* **BREAKING CHANGE**: Renames error code `cameraPermission` to `CameraAccessDenied` to be consistent with other platforms.

## 0.2.1+6

* Minor fixes for new analysis options.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void main() {
testWidgets('permissionDenied', (WidgetTester tester) async {
expect(
CameraErrorCode.permissionDenied.toString(),
equals('cameraPermission'),
equals('CameraAccessDenied'),
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CameraErrorCode {
/// The camera cannot be used or the permission
/// to access the camera is not granted.
static const CameraErrorCode permissionDenied =
CameraErrorCode._('cameraPermission');
CameraErrorCode._('CameraAccessDenied');

/// The camera options are incorrect or attempted
/// to access the media input from an insecure context.
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_web
description: A Flutter plugin for getting information about and controlling the camera on Web.
repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.2.1+6
version: 0.3.0

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down

0 comments on commit 44ec6c5

Please sign in to comment.