Skip to content

Commit

Permalink
[camera] Document -1 return value for getExposureOffsetStepSize (fl…
Browse files Browse the repository at this point in the history
…utter#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#6059 (comment)).
  • Loading branch information
camsim99 authored Feb 23, 2024
1 parent f191932 commit 74eeb29
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/camera/camera_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## NEXT
## 2.7.4

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

## 2.7.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ abstract class CameraPlatform extends PlatformInterface {

/// Gets the supported step size for exposure offset for the selected camera in EV units.
///
/// Returns 0 when the camera supports using a free value without stepping.
/// Returns 0 when the camera supports using a free value without stepping and
/// returns -1 when exposure compensation is not supported.
Future<double> getExposureOffsetStepSize(int cameraId) {
throw UnimplementedError('getMinExposureOffset() is not implemented.');
}
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/camera/camera
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.7.3
version: 2.7.4

environment:
sdk: ^3.1.0
Expand Down

0 comments on commit 74eeb29

Please sign in to comment.