Skip to content

Commit d026d07

Browse files
authored
[camera] set useAutoFocus to true by default (flutter#3396)
* set useAutoFocus to true by default there's no way to set useAutoFocus to `true` and it is `false` by default so the auto focus is not working. * Update pubspec.yaml * Update CHANGELOG.md
1 parent 43ee609 commit d026d07

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/camera/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.4+4
2+
3+
* Set camera auto focus enabled by default.
4+
15
## 0.6.4+3
26

37
* Detect if selected camera supports auto focus and act accordingly on Android. This solves a problem where front facing cameras are not capturing the picture because auto focus is not supported.

packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public class Camera {
9696
private PictureCaptureRequest pictureCaptureRequest;
9797
private CameraRegions cameraRegions;
9898
private int exposureOffset;
99-
private boolean useAutoFocus;
99+
private boolean useAutoFocus = true;
100100
private Range<Integer> fpsRange;
101101

102102
public Camera(

packages/camera/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera
22
description: A Flutter plugin for getting information about and controlling the
33
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
44
and streaming image buffers to dart.
5-
version: 0.6.4+3
5+
version: 0.6.4+4
66
homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera
77

88
dependencies:

0 commit comments

Comments
 (0)