From 7badd21d67db30019ae67ac26cd5c1e716ad9f04 Mon Sep 17 00:00:00 2001 From: Hennik Hunsaker Date: Thu, 2 Dec 2021 17:25:21 -0700 Subject: [PATCH 1/3] Switch to a new MLKit library which runs on-device --- README.md | 33 +++++------- example/android/app/build.gradle | 4 +- .../android/app/src/main/AndroidManifest.xml | 2 +- example/lib/main.dart | 11 ++-- example/lib/main_face.dart | 4 +- example/lib/main_live.dart | 12 ++--- example/pubspec.lock | 51 ++++--------------- example/pubspec.yaml | 1 + lib/flutter_camera_ml_vision.dart | 8 +-- lib/utils.dart | 34 +++++++------ pubspec.lock | 51 ++++--------------- pubspec.yaml | 6 +-- 12 files changed, 72 insertions(+), 145 deletions(-) diff --git a/README.md b/README.md index e5a2230..a92bf7c 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,10 @@ First, add `flutter_camera_ml_vision` as a dependency. dependencies: flutter: sdk: flutter - flutter_camera_ml_vision: ^2.2.4 + flutter_camera_ml_vision: ^3.0.1 ... ``` -## Configure Firebase -You must also configure Firebase for each platform project: Android and iOS (see the `example` folder or https://firebase.google.com/codelabs/firebase-get-to-know-flutter#3 for step by step details). - - ### iOS Add two rows to the ios/Runner/Info.plist: @@ -42,10 +38,10 @@ Or in text format add the key: If you're using one of the on-device APIs, include the corresponding ML Kit library model in your Podfile. Then run pod update in a terminal within the same directory as your Podfile. ``` -pod 'Firebase/MLVisionBarcodeModel' -pod 'Firebase/MLVisionFaceModel' -pod 'Firebase/MLVisionLabelModel' -pod 'Firebase/MLVisionTextModel' +pod 'GoogleMLKit/BarcodeScanning' +pod 'GoogleMLKit/FaceDetection' +pod 'GoogleMLKit/ImageLabeling' +pod 'GoogleMLKit/TextRecognition' ``` ### Android @@ -65,7 +61,7 @@ android { dependencies { // ... - api 'com.google.firebase:firebase-ml-vision-image-label-model:19.0.0' + api 'com.google.mlkit:image-labeling:17.0.5' } } ``` @@ -78,7 +74,7 @@ Optional but recommended: If you use the on-device API, configure your app to au ... @@ -90,7 +86,7 @@ Optional but recommended: If you use the on-device API, configure your app to au ```dart CameraMlVision>( - detector: FirebaseVision.instance.barcodeDetector().detectInImage, + detector: GoogleMlKit.vision.barcodeScanner().processImage, onResult: (List barcodes) { if (!mounted || resultSent) { return; @@ -101,15 +97,14 @@ CameraMlVision>( ) ``` -`CameraMlVision` is a widget that shows the preview of the camera. It takes a detector as a parameter here we pass the `detectInImage` method of the `BarcodeDetector` object. -The detector parameter can take all the different FirebaseVision Detector. Here is a list : +`CameraMlVision` is a widget that shows the preview of the camera. It takes a detector as a parameter; here we pass the `processImage` method of the `BarcodeScanner` object. +The detector parameter can take all the different MLKit Vision Detectors. Here is a list : ``` -FirebaseVision.instance.barcodeDetector().detectInImage -FirebaseVision.instance.cloudLabelDetector().detectInImage -FirebaseVision.instance.faceDetector().processImage -FirebaseVision.instance.labelDetector().detectInImage -FirebaseVision.instance.textRecognizer().processImage +GoogleMlKit.vision.barcodeScanner().processImage +GoogleMlKit.vision.imageLabeler().processImage +GoogleMlKit.vision.faceDetector().processImage +GoogleMlKit.vision.textDetector().processImage ``` Then when something is detected the onResult callback is called with the data in the parameter of the function. diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 456484e..77836b0 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -55,10 +55,8 @@ flutter { } dependencies { - api 'com.google.firebase:firebase-ml-vision-barcode-model:16.1.2' + implementation 'com.google.mlkit:barcode-scanning:17.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' } - -apply plugin: 'com.google.gms.google-services' diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 62f8934..67db473 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -31,7 +31,7 @@ diff --git a/example/lib/main.dart b/example/lib/main.dart index e5d416e..8c743f6 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,6 +1,7 @@ +import 'dart:developer'; import 'dart:ui'; -import 'package:firebase_ml_vision/firebase_ml_vision.dart'; +import 'package:google_ml_kit/google_ml_kit.dart'; import 'package:flutter/material.dart'; import 'package:flutter_camera_ml_vision/flutter_camera_ml_vision.dart'; @@ -55,7 +56,7 @@ class _MyHomePageState extends State { } setState(() { - data.add(barcode.displayValue); + data.add(barcode.value.displayValue); }); }, child: Text('Scan product'), @@ -78,7 +79,7 @@ class ScanPage extends StatefulWidget { class _ScanPageState extends State { bool resultSent = false; - BarcodeDetector detector = FirebaseVision.instance.barcodeDetector(); + BarcodeScanner scanner = GoogleMlKit.vision.barcodeScanner(); @override Widget build(BuildContext context) { @@ -97,7 +98,7 @@ class _ScanPageState extends State { ), ); }, - detector: detector.detectInImage, + detector: scanner.processImage, onResult: (List barcodes) { if (!mounted || resultSent || @@ -109,7 +110,7 @@ class _ScanPageState extends State { Navigator.of(context).pop(barcodes.first); }, onDispose: () { - detector.close(); + scanner.close(); }, ), ), diff --git a/example/lib/main_face.dart b/example/lib/main_face.dart index 805eaf1..f28a42c 100644 --- a/example/lib/main_face.dart +++ b/example/lib/main_face.dart @@ -1,5 +1,5 @@ import 'package:camera/camera.dart'; -import 'package:firebase_ml_vision/firebase_ml_vision.dart'; +import 'package:google_ml_kit/google_ml_kit.dart'; import 'package:flutter/material.dart'; import 'package:flutter_camera_ml_vision/flutter_camera_ml_vision.dart'; @@ -32,7 +32,7 @@ class _MyHomePageState extends State { final _scanKey = GlobalKey(); CameraLensDirection cameraLensDirection = CameraLensDirection.front; FaceDetector detector = - FirebaseVision.instance.faceDetector(FaceDetectorOptions( + GoogleMlKit.vision.faceDetector(FaceDetectorOptions( enableTracking: true, mode: FaceDetectorMode.accurate, )); diff --git a/example/lib/main_live.dart b/example/lib/main_live.dart index 4b0d214..f6b6cba 100644 --- a/example/lib/main_live.dart +++ b/example/lib/main_live.dart @@ -1,4 +1,4 @@ -import 'package:firebase_ml_vision/firebase_ml_vision.dart'; +import 'package:google_ml_kit/google_ml_kit.dart'; import 'package:flutter/material.dart'; import 'package:flutter_camera_ml_vision/flutter_camera_ml_vision.dart'; @@ -29,7 +29,7 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { List data = []; final _scanKey = GlobalKey(); - BarcodeDetector detector = FirebaseVision.instance.barcodeDetector(); + BarcodeScanner scanner = GoogleMlKit.vision.barcodeScanner(); @override Widget build(BuildContext context) { @@ -42,21 +42,21 @@ class _MyHomePageState extends State { children: [ CameraMlVision>( key: _scanKey, - detector: detector.detectInImage, + detector: scanner.processImage, resolution: ResolutionPreset.high, onResult: (barcodes) { if (barcodes == null || barcodes.isEmpty || - data.contains(barcodes.first.displayValue) || + data.contains(barcodes.first.value.displayValue) || !mounted) { return; } setState(() { - data.add(barcodes.first.displayValue); + data.add(barcodes.first.value.displayValue); }); }, onDispose: () { - detector.close(); + scanner.close(); }, ), Container( diff --git a/example/pubspec.lock b/example/pubspec.lock index aff02c6..b040bdb 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.8.1" boolean_selector: dependency: transitive description: @@ -42,7 +42,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -106,34 +106,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "6.1.0" - firebase_core: - dependency: transitive - description: - name: firebase_core - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - firebase_ml_vision: - dependency: transitive - description: - name: firebase_ml_vision - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.0+1" flutter: dependency: "direct main" description: flutter @@ -145,24 +117,19 @@ packages: path: ".." relative: true source: path - version: "3.0.0+1" + version: "3.0.1" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - js: + google_ml_kit: dependency: transitive description: - name: js + name: google_ml_kit url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.7.3" matcher: dependency: transitive description: @@ -176,7 +143,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -265,7 +232,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -307,7 +274,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.4.2" typed_data: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 61d2aa0..0736b8f 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -30,6 +30,7 @@ dev_dependencies: flutter_test: sdk: flutter +publish_to: none # For information on the generic Dart part of this file, see the # following page: https://www.dartlang.org/tools/pub/pubspec diff --git a/lib/flutter_camera_ml_vision.dart b/lib/flutter_camera_ml_vision.dart index 6c9689b..849df53 100644 --- a/lib/flutter_camera_ml_vision.dart +++ b/lib/flutter_camera_ml_vision.dart @@ -8,7 +8,7 @@ import 'dart:ui'; import 'package:camera/camera.dart'; import 'package:collection/collection.dart'; import 'package:device_info/device_info.dart'; -import 'package:firebase_ml_vision/firebase_ml_vision.dart'; +import 'package:google_ml_kit/google_ml_kit.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -18,7 +18,7 @@ export 'package:camera/camera.dart'; part 'utils.dart'; -typedef HandleDetection = Future Function(FirebaseVisionImage image); +typedef HandleDetection = Future Function(InputImage image); typedef ErrorWidgetBuilder = Widget Function( BuildContext context, CameraError error); @@ -66,7 +66,7 @@ class CameraMlVisionState extends State> XFile? _lastImage; final _visibilityKey = UniqueKey(); CameraController? _cameraController; - ImageRotation? _rotation; + InputImageRotation? _rotation; _CameraState _cameraMlVisionState = _CameraState.loading; CameraError _cameraError = CameraError.unknown; bool _alreadyCheckingImage = false; @@ -149,7 +149,7 @@ class CameraMlVisionState extends State> CameraValue? get cameraValue => _cameraController?.value; - ImageRotation? get imageRotation => _rotation; + InputImageRotation? get imageRotation => _rotation; Future Function() get prepareForVideoRecording => _cameraController!.prepareForVideoRecording; diff --git a/lib/utils.dart b/lib/utils.dart index 571cd18..cc77716 100644 --- a/lib/utils.dart +++ b/lib/utils.dart @@ -2,7 +2,8 @@ part of 'flutter_camera_ml_vision.dart'; Future _getCamera(CameraLensDirection dir) async { final cameras = await availableCameras(); - final camera = cameras.firstWhereOrNull((camera) => camera.lensDirection == dir); + final camera = + cameras.firstWhereOrNull((camera) => camera.lensDirection == dir); return camera ?? (cameras.isEmpty ? null : cameras.first); } @@ -12,17 +13,18 @@ Uint8List _concatenatePlanes(List planes) { return allBytes.done().buffer.asUint8List(); } -FirebaseVisionImageMetadata buildMetaData( +InputImageData buildMetaData( CameraImage image, - ImageRotation rotation, + InputImageRotation rotation, ) { - return FirebaseVisionImageMetadata( - rawFormat: image.format.raw, + return InputImageData( + inputImageFormat: InputImageFormatMethods.fromRawValue(image.format.raw) ?? + InputImageFormat.NV21, size: Size(image.width.toDouble(), image.height.toDouble()), - rotation: rotation, + imageRotation: rotation, planeData: image.planes .map( - (plane) => FirebaseVisionImagePlaneMetadata( + (plane) => InputImagePlaneMetadata( bytesPerRow: plane.bytesPerRow, height: plane.height, width: plane.width, @@ -35,26 +37,26 @@ FirebaseVisionImageMetadata buildMetaData( Future _detect( CameraImage image, HandleDetection handleDetection, - ImageRotation rotation, + InputImageRotation rotation, ) async { return handleDetection( - FirebaseVisionImage.fromBytes( - _concatenatePlanes(image.planes), - buildMetaData(image, rotation), + InputImage.fromBytes( + bytes: _concatenatePlanes(image.planes), + inputImageData: buildMetaData(image, rotation), ), ); } -ImageRotation _rotationIntToImageRotation(int rotation) { +InputImageRotation _rotationIntToImageRotation(int rotation) { switch (rotation) { case 0: - return ImageRotation.rotation0; + return InputImageRotation.Rotation_0deg; case 90: - return ImageRotation.rotation90; + return InputImageRotation.Rotation_90deg; case 180: - return ImageRotation.rotation180; + return InputImageRotation.Rotation_180deg; default: assert(rotation == 270); - return ImageRotation.rotation270; + return InputImageRotation.Rotation_270deg; } } diff --git a/pubspec.lock b/pubspec.lock index ae6c6ca..9a19ecc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.8.1" boolean_selector: dependency: transitive description: @@ -42,7 +42,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -99,34 +99,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "6.1.0" - firebase_core: - dependency: "direct main" - description: - name: firebase_core - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - firebase_ml_vision: - dependency: "direct main" - description: - name: firebase_ml_vision - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.0+1" flutter: dependency: "direct main" description: flutter @@ -137,18 +109,13 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - js: - dependency: transitive + google_ml_kit: + dependency: "direct main" description: - name: js + name: google_ml_kit url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.7.3" matcher: dependency: transitive description: @@ -162,7 +129,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -251,7 +218,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -293,7 +260,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.4.2" typed_data: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9a193c3..e3be73b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,11 +10,7 @@ environment: dependencies: flutter: sdk: flutter - firebase_ml_vision: ^0.12.0+1 - #git: - # url: git://github.com/algirdasmac/flutterfire - # path: packages/firebase_ml_vision - firebase_core: ^1.1.0 + google_ml_kit: ^0.7.3 visibility_detector: ^0.2.0 path_provider: ^2.0.1 pedantic: ^1.11.0 From 52ced2fc07ed10a77469cac5ab8ad115182c9c6f Mon Sep 17 00:00:00 2001 From: Hennik Hunsaker Date: Mon, 6 Dec 2021 08:57:41 -0700 Subject: [PATCH 2/3] iOS fixes for the new on-device MLKit --- example/ios/Podfile | 5 +- example/ios/Podfile.lock | 347 ++++++++++++------ example/ios/Runner.xcodeproj/project.pbxproj | 38 ++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 + 4 files changed, 283 insertions(+), 115 deletions(-) mode change 100644 => 100755 example/ios/Podfile mode change 100644 => 100755 example/ios/Runner.xcodeproj/project.pbxproj create mode 100755 example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/ios/Podfile b/example/ios/Podfile old mode 100644 new mode 100755 index 81349de..68e3e43 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -29,9 +29,8 @@ flutter_ios_podfile_setup target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -# because of issue https://github.com/FirebaseExtended/flutterfire/issues/4625#issuecomment-821792539 -# need custom git version until it's done - pod 'FirebaseMLVisionBarcodeModel', '0.21', :source => 'git@github.com:rozdonmobile/CocoaPodsSpecs.git' + + pod 'GoogleMLKit/BarcodeScanning', '~> 2.2.0' end post_install do |installer| diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 3af4afd..b224540 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -3,158 +3,281 @@ PODS: - Flutter - device_info (0.0.1): - Flutter - - Firebase/CoreOnly (7.3.0): - - FirebaseCore (= 7.3.0) - - Firebase/MLVision (7.3.0): - - Firebase/CoreOnly - - FirebaseMLVision (~> 7.3.0-beta) - - firebase_core (1.0.3): - - Firebase/CoreOnly (= 7.3.0) - - Flutter - - firebase_ml_vision (0.1.1): - - Firebase/MLVision (= 7.3.0) - - firebase_core + - FirebaseCore (8.10.0): + - FirebaseCoreDiagnostics (~> 8.0) + - GoogleUtilities/Environment (~> 7.6) + - GoogleUtilities/Logger (~> 7.6) + - FirebaseCoreDiagnostics (8.10.0): + - GoogleDataTransport (~> 9.1) + - GoogleUtilities/Environment (~> 7.6) + - GoogleUtilities/Logger (~> 7.6) + - nanopb (~> 2.30908.0) + - FirebaseInstallations (8.10.0): + - FirebaseCore (~> 8.0) + - GoogleUtilities/Environment (~> 7.6) + - GoogleUtilities/UserDefaults (~> 7.6) + - PromisesObjC (< 3.0, >= 1.2) + - Flutter (1.0.0) + - google_ml_kit (0.6.0): - Flutter - - FirebaseCore (7.3.0): - - FirebaseCoreDiagnostics (~> 7.0) - - GoogleUtilities/Environment (~> 7.0) - - GoogleUtilities/Logger (~> 7.0) - - FirebaseCoreDiagnostics (7.7.0): - - GoogleDataTransport (~> 8.0) - - GoogleUtilities/Environment (~> 7.0) - - GoogleUtilities/Logger (~> 7.0) - - nanopb (~> 2.30907.0) - - FirebaseInstallations (7.10.0): - - FirebaseCore (~> 7.0) - - GoogleUtilities/Environment (~> 7.0) - - GoogleUtilities/UserDefaults (~> 7.0) - - PromisesObjC (~> 1.2) - - FirebaseMLCommon (7.6.0-beta): - - FirebaseCore (~> 7.0) - - FirebaseInstallations (~> 7.0) + - GoogleMLKit/BarcodeScanning (~> 2.2.0) + - GoogleMLKit/DigitalInkRecognition (~> 2.2.0) + - GoogleMLKit/FaceDetection (~> 2.2.0) + - GoogleMLKit/ImageLabeling (~> 2.2.0) + - GoogleMLKit/ImageLabelingCustom (~> 2.2.0) + - GoogleMLKit/LanguageID (~> 2.2.0) + - GoogleMLKit/LinkFirebase (~> 2.2.0) + - GoogleMLKit/PoseDetection (~> 2.2.0) + - GoogleMLKit/PoseDetectionAccurate (~> 2.2.0) + - GoogleMLKit/TextRecognition (~> 2.2.0) + - GoogleDataTransport (9.1.2): + - GoogleUtilities/Environment (~> 7.2) + - nanopb (~> 2.30908.0) + - PromisesObjC (< 3.0, >= 1.2) + - GoogleMLKit/BarcodeScanning (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitBarcodeScanning (~> 1.3.0) + - GoogleMLKit/DigitalInkRecognition (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitDigitalInkRecognition (~> 1.3.0) + - GoogleMLKit/FaceDetection (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitFaceDetection (~> 1.3.0) + - GoogleMLKit/ImageLabeling (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitImageLabeling (~> 1.3.0) + - GoogleMLKit/ImageLabelingCustom (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitImageLabelingCustom (~> 1.3.0) + - GoogleMLKit/LanguageID (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitLanguageID (~> 1.3.0) + - GoogleMLKit/LinkFirebase (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitLinkFirebase (~> 1.3.0) + - GoogleMLKit/MLKitCore (2.2.0): + - MLKitCommon (~> 3.0.0) + - GoogleMLKit/PoseDetection (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitPoseDetection (~> 1.0.0-beta4) + - GoogleMLKit/PoseDetectionAccurate (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitPoseDetectionAccurate (~> 1.0.0-beta4) + - GoogleMLKit/TextRecognition (2.2.0): + - GoogleMLKit/MLKitCore + - MLKitTextRecognition (~> 1.3.0) + - GoogleToolboxForMac/DebugUtils (2.3.2): + - GoogleToolboxForMac/Defines (= 2.3.2) + - GoogleToolboxForMac/Defines (2.3.2) + - GoogleToolboxForMac/Logger (2.3.2): + - GoogleToolboxForMac/Defines (= 2.3.2) + - "GoogleToolboxForMac/NSData+zlib (2.3.2)": + - GoogleToolboxForMac/Defines (= 2.3.2) + - "GoogleToolboxForMac/NSDictionary+URLArguments (2.3.2)": + - GoogleToolboxForMac/DebugUtils (= 2.3.2) + - GoogleToolboxForMac/Defines (= 2.3.2) + - "GoogleToolboxForMac/NSString+URLArguments (= 2.3.2)" + - "GoogleToolboxForMac/NSString+URLArguments (2.3.2)" + - GoogleToolboxForMac/StringEncoding (2.3.2): + - GoogleToolboxForMac/Defines (= 2.3.2) + - GoogleUtilities/Environment (7.6.0): + - PromisesObjC (< 3.0, >= 1.2) + - GoogleUtilities/Logger (7.6.0): + - GoogleUtilities/Environment + - GoogleUtilities/UserDefaults (7.6.0): + - GoogleUtilities/Logger + - GoogleUtilitiesComponents (1.1.0): + - GoogleUtilities/Logger + - GTMSessionFetcher/Core (1.7.0) + - MLImage (1.0.0-beta1) + - MLKitBarcodeScanning (1.3.0): + - MLKitCommon (~> 3.0) + - MLKitVision (~> 1.3) + - MLKitCommon (3.0.0): + - GoogleDataTransport (~> 9.0) - GoogleToolboxForMac/Logger (~> 2.1) - "GoogleToolboxForMac/NSData+zlib (~> 2.1)" - "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)" - GoogleUtilities/UserDefaults (~> 7.0) + - GoogleUtilitiesComponents (~> 1.0) - GTMSessionFetcher/Core (~> 1.1) - Protobuf (~> 3.12) - - FirebaseMLVision (7.3.0-beta): - - FirebaseCore (~> 7.0) - - FirebaseMLCommon (~> 7.0-beta) - - GoogleAPIClientForREST/Core (~> 1.3) - - GoogleAPIClientForREST/Vision (~> 1.3) + - MLKitDigitalInkRecognition (1.3.0): + - MLKitCommon (~> 3.0) + - MLKitMDD (~> 1.3) + - SSZipArchive (~> 2.1) + - MLKitFaceDetection (1.3.0): + - MLKitCommon (~> 3.0) + - MLKitVision (~> 1.3) + - MLKitImageLabeling (1.3.0): + - MLKitCommon (~> 3.0) + - MLKitImageLabelingCommon (~> 1.3) + - MLKitVision (~> 1.3) + - MLKitVisionKit (~> 2.2) + - MLKitImageLabelingCommon (1.3.0): + - MLKitCommon (~> 3.0) + - MLKitVision (~> 1.3) + - MLKitImageLabelingCustom (1.3.0): + - MLKitCommon (~> 3.0) + - MLKitImageLabelingCommon (~> 1.3) + - MLKitVision (~> 1.3) + - MLKitVisionKit (~> 2.2) + - MLKitLanguageID (1.3.0): + - MLKitNaturalLanguage (~> 1.3) + - MLKitLinkFirebase (1.3.0): + - FirebaseCore (~> 8.0) + - FirebaseInstallations (~> 8.0) + - GTMSessionFetcher/Core (~> 1.1) + - MLKitCommon (~> 3.0) + - MLKitMDD (1.3.0): + - MLKitCommon (~> 3.0) + - MLKitNaturalLanguage (1.3.0): - GoogleToolboxForMac/Logger (~> 2.1) - "GoogleToolboxForMac/NSData+zlib (~> 2.1)" + - "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)" + - GoogleToolboxForMac/StringEncoding (~> 2.1) - GTMSessionFetcher/Core (~> 1.1) + - MLKitCommon (~> 3.0) - Protobuf (~> 3.12) - - FirebaseMLVisionBarcodeModel (0.21.0): - - FirebaseMLVision (= 7.3.0-beta) - - Flutter (1.0.0) - - GoogleAPIClientForREST/Core (1.5.2): - - GTMSessionFetcher (>= 1.1.7) - - GoogleAPIClientForREST/Vision (1.5.2): - - GoogleAPIClientForREST/Core - - GTMSessionFetcher (>= 1.1.7) - - GoogleDataTransport (8.2.0): - - nanopb (~> 2.30907.0) - - GoogleToolboxForMac/DebugUtils (2.3.1): - - GoogleToolboxForMac/Defines (= 2.3.1) - - GoogleToolboxForMac/Defines (2.3.1) - - GoogleToolboxForMac/Logger (2.3.1): - - GoogleToolboxForMac/Defines (= 2.3.1) - - "GoogleToolboxForMac/NSData+zlib (2.3.1)": - - GoogleToolboxForMac/Defines (= 2.3.1) - - "GoogleToolboxForMac/NSDictionary+URLArguments (2.3.1)": - - GoogleToolboxForMac/DebugUtils (= 2.3.1) - - GoogleToolboxForMac/Defines (= 2.3.1) - - "GoogleToolboxForMac/NSString+URLArguments (= 2.3.1)" - - "GoogleToolboxForMac/NSString+URLArguments (2.3.1)" - - GoogleUtilities/Environment (7.2.2): - - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (7.2.2): - - GoogleUtilities/Environment - - GoogleUtilities/UserDefaults (7.2.2): - - GoogleUtilities/Logger - - GTMSessionFetcher (1.5.0): - - GTMSessionFetcher/Full (= 1.5.0) - - GTMSessionFetcher/Core (1.5.0) - - GTMSessionFetcher/Full (1.5.0): - - GTMSessionFetcher/Core (= 1.5.0) - - nanopb (2.30907.0): - - nanopb/decode (= 2.30907.0) - - nanopb/encode (= 2.30907.0) - - nanopb/decode (2.30907.0) - - nanopb/encode (2.30907.0) - - path_provider (0.0.1): + - MLKitObjectDetectionCommon (1.3.0): + - MLKitCommon (~> 3.0) + - MLKitVision (~> 1.3) + - MLKitPoseDetection (1.0.0-beta4): + - MLKitCommon (~> 3.0) + - MLKitPoseDetectionCommon (= 1.0.0-beta4) + - MLKitXenoCommon (= 1.0.0-beta4) + - MLKitPoseDetectionAccurate (1.0.0-beta4): + - MLKitCommon (~> 3.0) + - MLKitPoseDetectionCommon (= 1.0.0-beta4) + - MLKitXenoCommon (= 1.0.0-beta4) + - MLKitPoseDetectionCommon (1.0.0-beta4): + - MLKitCommon (~> 3.0) + - MLKitXenoCommon (= 1.0.0-beta4) + - MLKitTextRecognition (1.3.0): + - MLKitCommon (~> 3.0) + - MLKitVision (~> 1.3) + - MLKitVision (1.3.0): + - GoogleToolboxForMac/Logger (~> 2.1) + - "GoogleToolboxForMac/NSData+zlib (~> 2.1)" + - GTMSessionFetcher/Core (~> 1.1) + - MLImage (= 1.0.0-beta1) + - MLKitCommon (~> 3.0) + - Protobuf (~> 3.12) + - MLKitVisionKit (2.2.0): + - MLKitCommon (~> 3.0) + - MLKitImageLabelingCommon (~> 1.3) + - MLKitObjectDetectionCommon (~> 1.3) + - MLKitVision (~> 1.3) + - MLKitXenoCommon (1.0.0-beta4): + - MLKitCommon (~> 3.0) + - MLKitVision (~> 1.3) + - nanopb (2.30908.0): + - nanopb/decode (= 2.30908.0) + - nanopb/encode (= 2.30908.0) + - nanopb/decode (2.30908.0) + - nanopb/encode (2.30908.0) + - path_provider_ios (0.0.1): - Flutter - - PromisesObjC (1.2.12) - - Protobuf (3.14.0) + - PromisesObjC (2.0.0) + - Protobuf (3.19.1) + - SSZipArchive (2.4.2) DEPENDENCIES: - camera (from `.symlinks/plugins/camera/ios`) - device_info (from `.symlinks/plugins/device_info/ios`) - - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - - firebase_ml_vision (from `.symlinks/plugins/firebase_ml_vision/ios`) - - FirebaseMLVisionBarcodeModel (= 0.21) - Flutter (from `Flutter`) - - path_provider (from `.symlinks/plugins/path_provider/ios`) + - google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) + - GoogleMLKit/BarcodeScanning (~> 2.2.0) + - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) SPEC REPOS: - "git@github.com:rozdonmobile/CocoaPodsSpecs.git": - - FirebaseMLVisionBarcodeModel trunk: - - Firebase - FirebaseCore - FirebaseCoreDiagnostics - FirebaseInstallations - - FirebaseMLCommon - - FirebaseMLVision - - GoogleAPIClientForREST - GoogleDataTransport + - GoogleMLKit - GoogleToolboxForMac - GoogleUtilities + - GoogleUtilitiesComponents - GTMSessionFetcher + - MLImage + - MLKitBarcodeScanning + - MLKitCommon + - MLKitDigitalInkRecognition + - MLKitFaceDetection + - MLKitImageLabeling + - MLKitImageLabelingCommon + - MLKitImageLabelingCustom + - MLKitLanguageID + - MLKitLinkFirebase + - MLKitMDD + - MLKitNaturalLanguage + - MLKitObjectDetectionCommon + - MLKitPoseDetection + - MLKitPoseDetectionAccurate + - MLKitPoseDetectionCommon + - MLKitTextRecognition + - MLKitVision + - MLKitVisionKit + - MLKitXenoCommon - nanopb - PromisesObjC - Protobuf + - SSZipArchive EXTERNAL SOURCES: camera: :path: ".symlinks/plugins/camera/ios" device_info: :path: ".symlinks/plugins/device_info/ios" - firebase_core: - :path: ".symlinks/plugins/firebase_core/ios" - firebase_ml_vision: - :path: ".symlinks/plugins/firebase_ml_vision/ios" Flutter: :path: Flutter - path_provider: - :path: ".symlinks/plugins/path_provider/ios" + google_ml_kit: + :path: ".symlinks/plugins/google_ml_kit/ios" + path_provider_ios: + :path: ".symlinks/plugins/path_provider_ios/ios" SPEC CHECKSUMS: - camera: a0ca5080336f7af47b88436e5e26da3dee5568f0 + camera: 3164201dc344383e62282964016528c4f5a9ad50 device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 - Firebase: 26223c695fe322633274198cb19dca8cb7e54416 - firebase_core: b5d81dfd4fb2d6f700e67de34d9a633ae325c4e9 - firebase_ml_vision: f35a919d973f32a1171d5450dd4b534a299bd6b1 - FirebaseCore: 4d3c72622ce0e2106aaa07bb4b2935ba2c370972 - FirebaseCoreDiagnostics: 179bf3831213451c8addd036aca7fcf5492ec154 - FirebaseInstallations: bf2ec8dbf36ff4c91af6b9a003d15855757680c1 - FirebaseMLCommon: cbab07a0cfa19b982819fc9e030e6f3d569c23a6 - FirebaseMLVision: f6611d6c1e1895604f9033809f8e3d328ccf697a - FirebaseMLVisionBarcodeModel: 8b24ab39ecf6dda920f5156a53fb97025679353a - Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c - GoogleAPIClientForREST: 538a8ad0014fd88b78894e77100775a6b0a4f7ed - GoogleDataTransport: 1024b1a4dfbd7a0e92cb20d7e0a6f1fb66b449a4 - GoogleToolboxForMac: 471e0c05d39506e50e6398f46fa9a12ae0efeff9 - GoogleUtilities: 31c5b01f978a70c6cff2afc6272b3f1921614b43 - GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52 - nanopb: 59221d7f958fb711001e6a449489542d92ae113e - path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c - PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 - Protobuf: 0cde852566359049847168e51bd1c690e0f70056 + FirebaseCore: 04186597c095da37d90ff9fd3e53bc61a1ff2440 + FirebaseCoreDiagnostics: 56fb7216d87e0e6ec2feddefa9d8a392fe8b2c18 + FirebaseInstallations: 830327b45345ffc859eaa9c17bcd5ae893fd5425 + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + google_ml_kit: a85eefb9ea6156b27ee2fba2b71e461e7b26a4f6 + GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940 + GoogleMLKit: 85ffdc9641d05311c76dbba5bbf93059087be12f + GoogleToolboxForMac: 8bef7c7c5cf7291c687cf5354f39f9db6399ad34 + GoogleUtilities: 684ee790a24f73ebb2d1d966e9711c203f2a4237 + GoogleUtilitiesComponents: 679b2c881db3b615a2777504623df6122dd20afe + GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91 + MLImage: 647f3d580c10b3c9a3f6154f5d7baead60c42a0c + MLKitBarcodeScanning: 6b998bd1cfe471ae407a7f647d649494617787c0 + MLKitCommon: 6d6be0a2e9a6340aad1c1f2b9449c11dee8af70f + MLKitDigitalInkRecognition: 7913834c241b25f9dff538fa1cebe3d59afccf66 + MLKitFaceDetection: 897f007aa4eb426ef1bac7c66e5451d02ffc2e83 + MLKitImageLabeling: fc44a4f90b1cf16bcb62c043d477c052ba7539ca + MLKitImageLabelingCommon: fbe695a04fb236555e6b7e69e7def153a04324c1 + MLKitImageLabelingCustom: 83e609e6b7dd8a16dc8790ef325bab1372d1d91d + MLKitLanguageID: 3848cf59a1693e2076ba65b37da261c674f97170 + MLKitLinkFirebase: ae5bd6996d0a1a3d3e0bb4c634b594101c07d094 + MLKitMDD: 37b4fbb5fd45809e646fca676945d6a8479ae66e + MLKitNaturalLanguage: 2a0295232578461ec25bf5933e45570c3b651d27 + MLKitObjectDetectionCommon: 6abf300c61cd781ee3abc8abea8a3f8baca886dc + MLKitPoseDetection: bbc263ae4e961e83c9350abe919cff183797e687 + MLKitPoseDetectionAccurate: c87162574669a84b89fdd0279a1f0722faa99b6e + MLKitPoseDetectionCommon: 5dedea934317c80c32b5eda8ede161128e096bdc + MLKitTextRecognition: fd52b7b3cef00751c202475f5a147e9752130767 + MLKitVision: 26da299aef93291f24f5200e8372919f73abf3b5 + MLKitVisionKit: 226bac429eda1d84285409e31ce9da72606850fb + MLKitXenoCommon: bf5b3528d77cabe0d04f3c13536ba1302346e31c + nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 + path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5 + PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58 + Protobuf: 3724efa50cb2846d7ccebc8691c574e85fd74471 + SSZipArchive: e7b4f3d9e780c2acc1764cd88fbf2de28f26e5b2 -PODFILE CHECKSUM: 1a13731d34096abdfa6c89540e481cbe7a631508 +PODFILE CHECKSUM: 3f2dbbdf0845c74c2573b286646b3bdbd130bbfd -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj old mode 100644 new mode 100755 index 7cec688..3676069 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -153,6 +153,7 @@ 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + FB4B285760BC7286F53B1AF7 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -264,6 +265,40 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + FB4B285760BC7286F53B1AF7 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/MLKitDigitalInkRecognition/MLKitDigitalInkRecognition_resource.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/MLKitFaceDetection/GoogleMVFaceDetectorResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/MLKitImageLabeling/MLKitImageLabelingResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/MLKitObjectDetectionCommon/MLKitObjectDetectionCommonResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/MLKitPoseDetection/MLKitPoseDetectionFastResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/MLKitPoseDetectionAccurate/MLKitPoseDetectionAccurateResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/MLKitPoseDetectionCommon/MLKitPoseDetectionCommonResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/MLKitTextRecognition/GoogleMVTextDetectorResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/MLKitXenoCommon/MLKitXenoResources.bundle", + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MLKitDigitalInkRecognition_resource.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMVFaceDetectorResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MLKitImageLabelingResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MLKitObjectDetectionCommonResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MLKitPoseDetectionFastResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MLKitPoseDetectionAccurateResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MLKitPoseDetectionCommonResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMVTextDetectorResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MLKitXenoResources.bundle", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -330,6 +365,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + EXCLUDED_ARCHS = armv7; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -401,6 +437,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + EXCLUDED_ARCHS = armv7; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -454,6 +491,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + EXCLUDED_ARCHS = armv7; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100755 index 0000000..18d9810 --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + From 69bf507498c3a83bf59b9fdfe5e3c3f4ad583d64 Mon Sep 17 00:00:00 2001 From: Hennik Hunsaker Date: Wed, 8 Dec 2021 12:27:18 -0700 Subject: [PATCH 3/3] Fix automated testing --- .github/workflows/main.yml | 7 ++----- README.md | 8 ++++---- .../android/app/src/main/AndroidManifest.xml | 17 ++++------------- .../MainActivity.java | 13 ------------- example/lib/main.dart | 1 - 5 files changed, 10 insertions(+), 36 deletions(-) delete mode 100644 example/android/app/src/main/java/fr/rushioconsulting/flutter_camera_ml_vision_example/MainActivity.java diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 20b58e0..1050222 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,8 +14,5 @@ jobs: steps: - uses: actions/checkout@v1 - - run: sudo chown -R cirrus:cirrus ./ /github/home/ - - name: Flutter pub get - run: flutter packages get - - name: Flutter analyze --suppress-analytics - run: flutter analyze --suppress-analytics + - run: flutter pub get + - run: flutter analyze --suppress-analytics diff --git a/README.md b/README.md index a92bf7c..825bec3 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,10 @@ Or in text format add the key: If you're using one of the on-device APIs, include the corresponding ML Kit library model in your Podfile. Then run pod update in a terminal within the same directory as your Podfile. ``` -pod 'GoogleMLKit/BarcodeScanning' -pod 'GoogleMLKit/FaceDetection' -pod 'GoogleMLKit/ImageLabeling' -pod 'GoogleMLKit/TextRecognition' +pod 'GoogleMLKit/BarcodeScanning' '~> 2.2.0' +pod 'GoogleMLKit/FaceDetection' '~> 2.2.0' +pod 'GoogleMLKit/ImageLabeling' '~> 2.2.0' +pod 'GoogleMLKit/TextRecognition' '~> 2.2.0' ``` ### Android diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 67db473..1c07baa 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -2,34 +2,25 @@ package="fr.rushioconsulting.flutter_camera_ml_vision_example" xmlns:tools="http://schemas.android.com/tools"> - - - + diff --git a/example/android/app/src/main/java/fr/rushioconsulting/flutter_camera_ml_vision_example/MainActivity.java b/example/android/app/src/main/java/fr/rushioconsulting/flutter_camera_ml_vision_example/MainActivity.java deleted file mode 100644 index e5b5c04..0000000 --- a/example/android/app/src/main/java/fr/rushioconsulting/flutter_camera_ml_vision_example/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package fr.rushioconsulting.flutter_camera_ml_vision_example; - -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} diff --git a/example/lib/main.dart b/example/lib/main.dart index 8c743f6..9005936 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,4 +1,3 @@ -import 'dart:developer'; import 'dart:ui'; import 'package:google_ml_kit/google_ml_kit.dart';