Skip to content

Commit 74eeb29

Browse files
authored
[camera] Document -1 return value for getExposureOffsetStepSize (flutter#6182)
Documents `getExposureOffsetStepSize` to return -1 if the device does not support exposure compensation. Helps account for `camera_android_camerax` since CameraX does not return a step size if exposure compensation is not supported. A follow up to [this discussion](flutter/packages#6059 (comment)).
1 parent f191932 commit 74eeb29

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/camera/camera_platform_interface/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
## NEXT
1+
## 2.7.4
22

33
* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
4+
* Documents `getExposureOffsetStepSize` to return -1 if the device does not support
5+
exposure compensation.
46

57
## 2.7.3
68

packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ abstract class CameraPlatform extends PlatformInterface {
221221

222222
/// Gets the supported step size for exposure offset for the selected camera in EV units.
223223
///
224-
/// Returns 0 when the camera supports using a free value without stepping.
224+
/// Returns 0 when the camera supports using a free value without stepping and
225+
/// returns -1 when exposure compensation is not supported.
225226
Future<double> getExposureOffsetStepSize(int cameraId) {
226227
throw UnimplementedError('getMinExposureOffset() is not implemented.');
227228
}

packages/camera/camera_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/camera/camera
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
55
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
66
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7-
version: 2.7.3
7+
version: 2.7.4
88

99
environment:
1010
sdk: ^3.1.0

0 commit comments

Comments
 (0)