Skip to content

Commit ebd0b8e

Browse files
srawlinsmauricioluz
authored andcommitted
[camera] Ignore body_might_complete_normally_catch_error violation (flutter#6049)
1 parent b761a3b commit ebd0b8e

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

packages/camera/camera_android/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Ignores missing return warnings in preparation for [upcoming analysis changes](https://github.com/flutter/flutter/issues/105750).
4+
15
## 0.9.8+3
26

37
* Skips duplicate calls to stop background thread and removes unnecessary closings of camera capture sessions on Android.

packages/camera/camera_android/lib/src/android_camera.dart

+6-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@ class AndroidCamera extends CameraPlatform {
138138
'cameraId': cameraId,
139139
'imageFormatGroup': imageFormatGroup.name(),
140140
},
141-
).catchError(
141+
)
142+
// TODO(srawlins): This should return a value of the future's type. This
143+
// will fail upcoming analysis checks with
144+
// https://github.com/flutter/flutter/issues/105750.
145+
// ignore: body_might_complete_normally_catch_error
146+
.catchError(
142147
(Object error, StackTrace stackTrace) {
143148
if (error is! PlatformException) {
144149
throw error;

packages/camera/camera_avfoundation/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Ignores missing return warnings in preparation for [upcoming analysis changes](https://github.com/flutter/flutter/issues/105750).
4+
15
## 0.9.8+2
26

37
* Fixes exception in registerWith caused by the switch to an in-package method channel.

packages/camera/camera_avfoundation/lib/src/avfoundation_camera.dart

+6-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@ class AVFoundationCamera extends CameraPlatform {
138138
'cameraId': cameraId,
139139
'imageFormatGroup': imageFormatGroup.name(),
140140
},
141-
).catchError(
141+
)
142+
// TODO(srawlins): This should return a value of the future's type. This
143+
// will fail upcoming analysis checks with
144+
// https://github.com/flutter/flutter/issues/105750.
145+
// ignore: body_might_complete_normally_catch_error
146+
.catchError(
142147
(Object error, StackTrace stackTrace) {
143148
if (error is! PlatformException) {
144149
throw error;

0 commit comments

Comments
 (0)