Skip to content

Commit

Permalink
[camera] Ignore body_might_complete_normally_catch_error violation (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
srawlins authored and yutaaraki-toydium committed Aug 12, 2022
1 parent 112ad0e commit d3f6de2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Ignores missing return warnings in preparation for [upcoming analysis changes](https://github.com/flutter/flutter/issues/105750).

## 0.9.8+3

* Skips duplicate calls to stop background thread and removes unnecessary closings of camera capture sessions on Android.
Expand Down
7 changes: 6 additions & 1 deletion packages/camera/camera_android/lib/src/android_camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ class AndroidCamera extends CameraPlatform {
'cameraId': cameraId,
'imageFormatGroup': imageFormatGroup.name(),
},
).catchError(
)
// TODO(srawlins): This should return a value of the future's type. This
// will fail upcoming analysis checks with
// https://github.com/flutter/flutter/issues/105750.
// ignore: body_might_complete_normally_catch_error
.catchError(
(Object error, StackTrace stackTrace) {
if (error is! PlatformException) {
throw error;
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_avfoundation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Ignores missing return warnings in preparation for [upcoming analysis changes](https://github.com/flutter/flutter/issues/105750).

## 0.9.8+2

* Fixes exception in registerWith caused by the switch to an in-package method channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ class AVFoundationCamera extends CameraPlatform {
'cameraId': cameraId,
'imageFormatGroup': imageFormatGroup.name(),
},
).catchError(
)
// TODO(srawlins): This should return a value of the future's type. This
// will fail upcoming analysis checks with
// https://github.com/flutter/flutter/issues/105750.
// ignore: body_might_complete_normally_catch_error
.catchError(
(Object error, StackTrace stackTrace) {
if (error is! PlatformException) {
throw error;
Expand Down

0 comments on commit d3f6de2

Please sign in to comment.