From a7e50dc54cce8087ca4b9d7417eee148a298ed78 Mon Sep 17 00:00:00 2001 From: Juan Martin Zabala Ochoa Date: Fri, 10 Nov 2023 09:44:06 -0500 Subject: [PATCH] error fixes --- .../ios/Classes/MLKVisionImage+FlutterPlugin.m | 6 +++--- packages/google_mlkit_commons/lib/src/input_image.dart | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google_mlkit_commons/ios/Classes/MLKVisionImage+FlutterPlugin.m b/packages/google_mlkit_commons/ios/Classes/MLKVisionImage+FlutterPlugin.m index 92577bed..1d0bb255 100644 --- a/packages/google_mlkit_commons/ios/Classes/MLKVisionImage+FlutterPlugin.m +++ b/packages/google_mlkit_commons/ios/Classes/MLKVisionImage+FlutterPlugin.m @@ -7,15 +7,15 @@ + (MLKVisionImage *)visionImageFromData:(NSDictionary *)imageData { NSString *imageType = imageData[@"type"]; if ([@"file" isEqualToString:imageType]) { int rotation = [imageData[@"metadata"][@"rotation"] intValue]; - int CameraLensDirection = [imageData[@"metadata"][@"camera_lens_direction"] intValue]; + int cameraLensDirection = [imageData[@"metadata"][@"camera_lens_direction"] intValue]; UIImageOrientation imageOrientation = [self imageOrientationFromRotation:rotation cameraLensDirection:cameraLensDirection]; MLKVisionImage *image = [self filePathToVisionImage:imageData[@"path"]]; image.orientation = imageOrientation; return image; } else if ([@"bytes" isEqualToString:imageType]) { int rotation = [imageData[@"metadata"][@"rotation"] intValue]; - int lensDirection = [imageData[@"metadata"][@"camera_lens_direction"] intValue]; - UIImageOrientation imageOrientation = [self imageOrientationFromRotation:rotation cameraLensDirection:cmaeraLensDirection]; + int cameraLensDirection = [imageData[@"metadata"][@"camera_lens_direction"] intValue]; + UIImageOrientation imageOrientation = [self imageOrientationFromRotation:rotation cameraLensDirection:cameraLensDirection]; MLKVisionImage *image = [self bytesToVisionImage:imageData]; image.orientation = imageOrientation; return image; diff --git a/packages/google_mlkit_commons/lib/src/input_image.dart b/packages/google_mlkit_commons/lib/src/input_image.dart index 49bb6311..b3ed1526 100644 --- a/packages/google_mlkit_commons/lib/src/input_image.dart +++ b/packages/google_mlkit_commons/lib/src/input_image.dart @@ -71,7 +71,7 @@ class InputImageMetadata { final int bytesPerRow; // Camera lens direction. - final InputImageLensDirection cameraLensDirection; + final InputImageCameraLensDirection cameraLensDirection; /// Constructor to create an instance of [InputImageMetadata]. InputImageMetadata({