Skip to content

Commit

Permalink
[camera] set useAutoFocus to true by default (flutter#3396)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
markfili committed Jan 7, 2021
1 parent 43ee609 commit d026d07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/camera/camera/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.6.4+4

* Set camera auto focus enabled by default.

## 0.6.4+3

* 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.
Expand Down
Expand Up @@ -96,7 +96,7 @@ public class Camera {
private PictureCaptureRequest pictureCaptureRequest;
private CameraRegions cameraRegions;
private int exposureOffset;
private boolean useAutoFocus;
private boolean useAutoFocus = true;
private Range<Integer> fpsRange;

public Camera(
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: camera
description: A Flutter plugin for getting information about and controlling the
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
and streaming image buffers to dart.
version: 0.6.4+3
version: 0.6.4+4
homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera

dependencies:
Expand Down

0 comments on commit d026d07

Please sign in to comment.