Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit b4e2224

Browse files
authored
[camera] Ignore body_might_complete_normally_catch_error violation (#6049)
1 parent d07de93 commit b4e2224

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

packages/camera/camera_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
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

Lines changed: 6 additions & 1 deletion
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 6 additions & 1 deletion
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)