Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit b111ed6

Browse files
committed
format obj-c code, version
1 parent ff3f08b commit b111ed6

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

packages/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.4
2+
3+
* Add zoom feature.
4+
15
## 0.4.3
26

37
* Add capability to prepare the capture session for video recording on iOS.

packages/camera/ios/Classes/CameraPlugin.m

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ - (instancetype)initWithCameraName:(NSString *)cameraName
170170
error:(NSError **)error {
171171
self = [super init];
172172
_zoom = 1;
173-
173+
174174
NSAssert(self, @"super init cannot be nil");
175175
_dispatchQueue = dispatchQueue;
176176
_captureSession = [[AVCaptureSession alloc] init];
@@ -220,23 +220,23 @@ - (void)stop {
220220
}
221221

222222
- (void)zoomIn {
223-
_zoom++;
224-
[_captureDevice lockForConfiguration:NULL];
225-
[_captureDevice setVideoZoomFactor:_zoom];
226-
[_captureDevice unlockForConfiguration];
223+
_zoom++;
224+
[_captureDevice lockForConfiguration:NULL];
225+
[_captureDevice setVideoZoomFactor:_zoom];
226+
[_captureDevice unlockForConfiguration];
227227
}
228228

229229
- (void)zoomOut {
230-
_zoom--;
231-
232-
if (_zoom < 1) {
233-
_zoom = 1;
234-
return;
235-
}
236-
237-
[_captureDevice lockForConfiguration:NULL];
238-
[_captureDevice setVideoZoomFactor:_zoom];
239-
[_captureDevice unlockForConfiguration];
230+
_zoom--;
231+
232+
if (_zoom < 1) {
233+
_zoom = 1;
234+
return;
235+
}
236+
237+
[_captureDevice lockForConfiguration:NULL];
238+
[_captureDevice setVideoZoomFactor:_zoom];
239+
[_captureDevice unlockForConfiguration];
240240
}
241241

242242
- (void)captureToFile:(NSString *)path result:(FlutterResult)result {
@@ -739,11 +739,11 @@ - (void)handleMethodCallAsync:(FlutterMethodCall *)call result:(FlutterResult)re
739739
[_camera stopImageStream];
740740
result(nil);
741741
} else if ([@"zoomIn" isEqualToString:call.method]) {
742-
[_camera zoomIn];
743-
result(nil);
742+
[_camera zoomIn];
743+
result(nil);
744744
} else if ([@"zoomOut" isEqualToString:call.method]) {
745-
[_camera zoomOut];
746-
result(nil);
745+
[_camera zoomOut];
746+
result(nil);
747747
} else {
748748
NSDictionary *argsMap = call.arguments;
749749
NSUInteger textureId = ((NSNumber *)argsMap[@"textureId"]).unsignedIntegerValue;

packages/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.4.3
5+
version: 0.4.4
66
authors:
77
- Flutter Team <flutter-dev@googlegroups.com>
88
- Luigi Agosti <luigi@tengio.com>

0 commit comments

Comments
 (0)