diff --git a/packages/camera/camera/CHANGELOG.md b/packages/camera/camera/CHANGELOG.md index 7391f3090565..29774748a32b 100644 --- a/packages/camera/camera/CHANGELOG.md +++ b/packages/camera/camera/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.0-nullsafety.2 + +* Solved delay when using the zoom feature on iOS. + ## 0.8.0-nullsafety.1 * Added a timeout to the pre-capture sequence on Android to prevent crashes when the camera cannot get a focus. diff --git a/packages/camera/camera/ios/Classes/CameraPlugin.m b/packages/camera/camera/ios/Classes/CameraPlugin.m index d97ce88a58d8..c1770ff6d40b 100644 --- a/packages/camera/camera/ios/Classes/CameraPlugin.m +++ b/packages/camera/camera/ios/Classes/CameraPlugin.m @@ -1068,7 +1068,7 @@ - (void)setZoomLevel:(CGFloat)zoom Result:(FlutterResult)result { result(getFlutterError(error)); return; } - [_captureDevice rampToVideoZoomFactor:zoom withRate:1]; + _captureDevice.videoZoomFactor = zoom; [_captureDevice unlockForConfiguration]; result(nil); diff --git a/packages/camera/camera/pubspec.yaml b/packages/camera/camera/pubspec.yaml index 5b98c39acd99..4b820b8b64cf 100644 --- a/packages/camera/camera/pubspec.yaml +++ b/packages/camera/camera/pubspec.yaml @@ -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.8.0-nullsafety.1 +version: 0.8.0-nullsafety.2 homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera dependencies: