Skip to content

Commit 29c9d1c

Browse files
authored
[camera] Solves delay when using the zoom feature on iOS. (flutter#3562)
1 parent f69e7dd commit 29c9d1c

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.8.0-nullsafety.2
2+
3+
* Solved delay when using the zoom feature on iOS.
4+
15
## 0.8.0-nullsafety.1
26

37
* Added a timeout to the pre-capture sequence on Android to prevent crashes when the camera cannot get a focus.

packages/camera/camera/ios/Classes/CameraPlugin.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ - (void)setZoomLevel:(CGFloat)zoom Result:(FlutterResult)result {
10681068
result(getFlutterError(error));
10691069
return;
10701070
}
1071-
[_captureDevice rampToVideoZoomFactor:zoom withRate:1];
1071+
_captureDevice.videoZoomFactor = zoom;
10721072
[_captureDevice unlockForConfiguration];
10731073

10741074
result(nil);

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.8.0-nullsafety.1
5+
version: 0.8.0-nullsafety.2
66
homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera
77

88
dependencies:

0 commit comments

Comments
 (0)