From 2c50a6395dcad7bfb668b218cbb8fe62a8eadef2 Mon Sep 17 00:00:00 2001 From: subramanian42 <88108372+subramanian42@users.noreply.github.com> Date: Fri, 3 Dec 2021 12:00:29 +0530 Subject: [PATCH 1/8] Update pubspec.yaml --- pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 9a193c3..28c3e7e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - firebase_ml_vision: ^0.12.0+1 + firebase_ml_vision: ^0.9.3+5 #git: # url: git://github.com/algirdasmac/flutterfire # path: packages/firebase_ml_vision @@ -19,7 +19,7 @@ dependencies: path_provider: ^2.0.1 pedantic: ^1.11.0 device_info: ^2.0.0 - camera: ^0.8.1 + camera: ^0.5.6+3 collection: ^1.15.0 dev_dependencies: From 74b5646f0f5516ac6fe6b8678c1b579ccb198774 Mon Sep 17 00:00:00 2001 From: subramanian42 <88108372+subramanian42@users.noreply.github.com> Date: Fri, 3 Dec 2021 12:08:07 +0530 Subject: [PATCH 2/8] Update pubspec.yaml --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 28c3e7e..56909b1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: path_provider: ^2.0.1 pedantic: ^1.11.0 device_info: ^2.0.0 - camera: ^0.5.6+3 + camera: ^0.7.0+2 collection: ^1.15.0 dev_dependencies: From afdfd83f031adbba6b1ef62b6aaf4cfac4de64bd Mon Sep 17 00:00:00 2001 From: subramanian42 <88108372+subramanian42@users.noreply.github.com> Date: Mon, 13 Dec 2021 16:53:29 +0530 Subject: [PATCH 3/8] Gradle upgrades --- example/android/app/build.gradle | 12 +++++++----- example/android/build.gradle | 5 +++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 456484e..517a5c5 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -22,10 +22,11 @@ if (flutterVersionName == null) { } apply plugin: 'com.android.application' +apply plugin: 'com.google.gms.google-services' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 29 lintOptions { disable 'InvalidPackage' @@ -33,9 +34,9 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "fr.rushioconsulting.flutter_camera_ml_vision_example" - minSdkVersion 21 - targetSdkVersion 28 + applicationId "com.android.flutter_camera_ml_example" + minSdkVersion 29 + targetSdkVersion 29 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -55,7 +56,8 @@ flutter { } dependencies { - api 'com.google.firebase:firebase-ml-vision-barcode-model:16.1.2' + implementation platform('com.google.firebase:firebase-bom:29.0.1') + api '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' diff --git a/example/android/build.gradle b/example/android/build.gradle index 48a84bd..2431bcf 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -5,8 +5,9 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' - classpath 'com.google.gms:google-services:4.3.5' + // classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.google.gms:google-services:4.3.10' } } From ea6a895f20031ce04739546ec47e1554f58ee222 Mon Sep 17 00:00:00 2001 From: subramanian42 <88108372+subramanian42@users.noreply.github.com> Date: Mon, 13 Dec 2021 16:54:13 +0530 Subject: [PATCH 4/8] migrating from version 1.12 --- example/android/app/src/main/AndroidManifest.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 62f8934..fe25c03 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -8,7 +8,6 @@ additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> + Date: Mon, 13 Dec 2021 16:55:31 +0530 Subject: [PATCH 5/8] upgraded older dependency to recent version --- example/.gitignore | 1 + .../MainActivity.java | 12 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/lib/main.dart | 8 +- example/lib/main_face.dart | 6 +- example/lib/main_live.dart | 10 +- example/pubspec.lock | 104 +++++++++++------- example/pubspec.yaml | 5 +- lib/flutter_camera_ml_vision.dart | 9 +- lib/utils.dart | 34 +++--- pubspec.yaml | 20 ++-- 11 files changed, 118 insertions(+), 93 deletions(-) diff --git a/example/.gitignore b/example/.gitignore index 3c3ed63..6eb40c5 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -31,6 +31,7 @@ **/android/**/gradle-wrapper.jar **/android/.gradle **/android/captures/ +**/android/app/google-services.json **/android/gradlew **/android/gradlew.bat **/android/local.properties 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 index e5b5c04..b4c70b8 100644 --- 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 @@ -1,13 +1,9 @@ package fr.rushioconsulting.flutter_camera_ml_vision_example; -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; +import io.flutter.embedding.android.FlutterActivity; + + public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } + } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 0afc797..60e1369 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip diff --git a/example/lib/main.dart b/example/lib/main.dart index e5d416e..e15c042 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,8 +1,8 @@ import 'dart:ui'; -import 'package:firebase_ml_vision/firebase_ml_vision.dart'; import 'package:flutter/material.dart'; import 'package:flutter_camera_ml_vision/flutter_camera_ml_vision.dart'; +import 'package:google_ml_kit/google_ml_kit.dart'; void main() => runApp(MyApp()); @@ -55,7 +55,7 @@ class _MyHomePageState extends State { } setState(() { - data.add(barcode.displayValue); + data.add(barcode.value.displayValue); }); }, child: Text('Scan product'), @@ -78,7 +78,7 @@ class ScanPage extends StatefulWidget { class _ScanPageState extends State { bool resultSent = false; - BarcodeDetector detector = FirebaseVision.instance.barcodeDetector(); + BarcodeScanner detector = GoogleMlKit.vision.barcodeScanner(); @override Widget build(BuildContext context) { @@ -97,7 +97,7 @@ class _ScanPageState extends State { ), ); }, - detector: detector.detectInImage, + detector: detector.processImage, onResult: (List barcodes) { if (!mounted || resultSent || diff --git a/example/lib/main_face.dart b/example/lib/main_face.dart index 805eaf1..f5e743d 100644 --- a/example/lib/main_face.dart +++ b/example/lib/main_face.dart @@ -1,7 +1,8 @@ import 'package:camera/camera.dart'; -import 'package:firebase_ml_vision/firebase_ml_vision.dart'; + import 'package:flutter/material.dart'; import 'package:flutter_camera_ml_vision/flutter_camera_ml_vision.dart'; +import 'package:google_ml_kit/google_ml_kit.dart'; void main() => runApp(MyApp()); @@ -31,8 +32,7 @@ class _MyHomePageState extends State { List _faces = []; final _scanKey = GlobalKey(); CameraLensDirection cameraLensDirection = CameraLensDirection.front; - FaceDetector detector = - FirebaseVision.instance.faceDetector(FaceDetectorOptions( + FaceDetector detector = 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..135e63c 100644 --- a/example/lib/main_live.dart +++ b/example/lib/main_live.dart @@ -1,6 +1,6 @@ -import 'package:firebase_ml_vision/firebase_ml_vision.dart'; import 'package:flutter/material.dart'; import 'package:flutter_camera_ml_vision/flutter_camera_ml_vision.dart'; +import 'package:google_ml_kit/google_ml_kit.dart'; void main() => runApp(MyApp()); @@ -29,7 +29,7 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { List data = []; final _scanKey = GlobalKey(); - BarcodeDetector detector = FirebaseVision.instance.barcodeDetector(); + BarcodeScanner detector = GoogleMlKit.vision.barcodeScanner(); @override Widget build(BuildContext context) { @@ -42,17 +42,17 @@ class _MyHomePageState extends State { children: [ CameraMlVision>( key: _scanKey, - detector: detector.detectInImage, + detector: detector.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: () { diff --git a/example/pubspec.lock b/example/pubspec.lock index aff02c6..a1e6107 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: @@ -21,14 +21,21 @@ packages: name: camera url: "https://pub.dartlang.org" source: hosted - version: "0.8.1" + version: "0.9.4+5" camera_platform_interface: dependency: transitive description: name: camera_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.1" + camera_web: + dependency: transitive + description: + name: camera_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.1+1" characters: dependency: transitive description: @@ -42,7 +49,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -63,28 +70,28 @@ packages: name: cross_file url: "https://pub.dartlang.org" source: hosted - version: "0.3.1+1" + version: "0.3.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "1.0.4" device_info: dependency: transitive description: name: device_info url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.3" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" fake_async: dependency: transitive description: @@ -98,42 +105,35 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.2" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.1.2" firebase_core: dependency: transitive description: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.10.5" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.2.2" 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" + version: "1.5.2" flutter: dependency: "direct main" description: flutter @@ -145,7 +145,14 @@ packages: path: ".." relative: true source: path - version: "3.0.0+1" + version: "3.0.1" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" flutter_test: dependency: "direct dev" description: flutter @@ -156,6 +163,13 @@ packages: description: flutter source: sdk version: "0.0.0" + google_ml_kit: + dependency: transitive + description: + name: google_ml_kit + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.3" js: dependency: transitive description: @@ -176,7 +190,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -190,70 +204,84 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.8" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.9" + path_provider_ios: + dependency: transitive + description: + name: path_provider_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.7" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.4" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.4" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.4" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.11.1" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "4.2.1" + version: "4.2.4" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.1+1" sky_engine: dependency: transitive description: flutter @@ -265,7 +293,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 +335,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: @@ -328,14 +356,14 @@ packages: name: visibility_detector url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.2" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.3.1" xdg_directories: dependency: transitive description: @@ -344,5 +372,5 @@ packages: source: hosted version: "0.2.0" sdks: - dart: ">=2.12.0 <3.0.0" - flutter: ">=1.22.0" + dart: ">=2.14.0 <3.0.0" + flutter: ">=2.5.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 61d2aa0..6cd94a3 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -13,16 +13,17 @@ description: A new Flutter project. # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html version: 1.0.0+1 +publish_to: none environment: sdk: ">=2.2.2 <3.0.0" dependencies: flutter: sdk: flutter - + # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.3 + cupertino_icons: ^1.0.4 flutter_camera_ml_vision: path: ../ diff --git a/lib/flutter_camera_ml_vision.dart b/lib/flutter_camera_ml_vision.dart index 6c9689b..e8f9278 100644 --- a/lib/flutter_camera_ml_vision.dart +++ b/lib/flutter_camera_ml_vision.dart @@ -8,17 +8,18 @@ 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:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:google_ml_kit/google_ml_kit.dart'; import 'package:visibility_detector/visibility_detector.dart'; 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 +67,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 +150,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.yaml b/pubspec.yaml index 56909b1..6073d4d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,6 @@ name: flutter_camera_ml_vision -description: A flutter widget that show the camera stream and allow ML vision recognition on it, it allow you to detect barcodes, labels, text, faces... +description: A flutter widget that show the camera stream and allow ML vision + recognition on it, it allow you to detect barcodes, labels, text, faces... version: 3.0.1 repository: https://github.com/rushio-consulting/flutter_camera_ml_vision homepage: https://github.com/rushio-consulting/flutter_camera_ml_vision @@ -8,21 +9,16 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: + camera: ^0.9.4+5 + collection: ^1.15.0 + device_info: ^2.0.0 + firebase_core: ^1.10.5 flutter: sdk: flutter - firebase_ml_vision: ^0.9.3+5 - #git: - # url: git://github.com/algirdasmac/flutterfire - # path: packages/firebase_ml_vision - firebase_core: ^1.1.0 - visibility_detector: ^0.2.0 + google_ml_kit: ^0.7.3 path_provider: ^2.0.1 - pedantic: ^1.11.0 - device_info: ^2.0.0 - camera: ^0.7.0+2 - collection: ^1.15.0 + visibility_detector: ^0.2.0 dev_dependencies: flutter_test: sdk: flutter - From c975c9c2323c1050e827f9cf6ee0f44217a1a50a Mon Sep 17 00:00:00 2001 From: subramanian42 <88108372+subramanian42@users.noreply.github.com> Date: Fri, 17 Dec 2021 17:22:40 +0530 Subject: [PATCH 6/8] removed unnecessary packages --- example/lib/main_face.dart | 2 - example/pubspec.lock | 66 ++----------------------- lib/flutter_camera_ml_vision.dart | 1 - pubspec.lock | 82 ++++++++----------------------- pubspec.yaml | 2 +- 5 files changed, 26 insertions(+), 127 deletions(-) diff --git a/example/lib/main_face.dart b/example/lib/main_face.dart index f5e743d..bf10272 100644 --- a/example/lib/main_face.dart +++ b/example/lib/main_face.dart @@ -1,5 +1,3 @@ -import 'package:camera/camera.dart'; - import 'package:flutter/material.dart'; import 'package:flutter_camera_ml_vision/flutter_camera_ml_vision.dart'; import 'package:google_ml_kit/google_ml_kit.dart'; diff --git a/example/pubspec.lock b/example/pubspec.lock index a1e6107..14b2bcd 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.8.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -15,34 +15,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - camera: - dependency: transitive - description: - name: camera - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.4+5" - camera_platform_interface: - dependency: transitive - description: - name: camera_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - camera_web: - dependency: transitive - description: - name: camera_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.1+1" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: @@ -64,13 +43,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" - cross_file: - dependency: transitive - description: - name: cross_file - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.2" cupertino_icons: dependency: "direct main" description: @@ -146,13 +118,6 @@ packages: relative: true source: path version: "3.0.1" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" flutter_test: dependency: "direct dev" description: flutter @@ -183,7 +148,7 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" meta: dependency: transitive description: @@ -247,13 +212,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" platform: dependency: transitive description: @@ -275,13 +233,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.2.4" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1+1" sky_engine: dependency: transitive description: flutter @@ -308,13 +259,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - stream_transform: - dependency: transitive - description: - name: stream_transform - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" string_scanner: dependency: transitive description: @@ -335,7 +279,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.3" typed_data: dependency: transitive description: @@ -349,7 +293,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" visibility_detector: dependency: transitive description: diff --git a/lib/flutter_camera_ml_vision.dart b/lib/flutter_camera_ml_vision.dart index e8f9278..f5ece39 100644 --- a/lib/flutter_camera_ml_vision.dart +++ b/lib/flutter_camera_ml_vision.dart @@ -3,7 +3,6 @@ library flutter_camera_ml_vision; import 'dart:async'; import 'dart:io'; import 'dart:typed_data'; -import 'dart:ui'; import 'package:camera/camera.dart'; import 'package:collection/collection.dart'; diff --git a/pubspec.lock b/pubspec.lock index ae6c6ca..ec32fa8 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.2" boolean_selector: dependency: transitive description: @@ -15,34 +15,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - camera: - dependency: "direct main" - description: - name: camera - url: "https://pub.dartlang.org" - source: hosted - version: "0.8.1" - camera_platform_interface: - dependency: transitive - description: - name: camera_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -57,13 +43,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" - cross_file: - dependency: transitive - description: - name: cross_file - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.1+1" device_info: dependency: "direct main" description: @@ -105,28 +84,21 @@ packages: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.10.6" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.2.3" 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" + version: "1.5.3" flutter: dependency: "direct main" description: flutter @@ -142,6 +114,13 @@ packages: description: flutter source: sdk version: "0.0.0" + google_ml_kit: + dependency: "direct main" + description: + name: google_ml_kit + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.3" js: dependency: transitive description: @@ -155,14 +134,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -205,13 +184,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.0" - pedantic: - dependency: "direct main" - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.0" platform: dependency: transitive description: @@ -233,13 +205,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.2.1" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" sky_engine: dependency: transitive description: flutter @@ -251,7 +216,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: @@ -266,13 +231,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - stream_transform: - dependency: transitive - description: - name: stream_transform - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" string_scanner: dependency: transitive description: @@ -293,7 +251,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.4.3" typed_data: dependency: transitive description: @@ -307,7 +265,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" visibility_detector: dependency: "direct main" description: @@ -330,5 +288,5 @@ packages: source: hosted version: "0.2.0" sdks: - dart: ">=2.12.0 <3.0.0" - flutter: ">=1.22.0" + dart: ">=2.14.0 <3.0.0" + flutter: ">=1.20.0" diff --git a/pubspec.yaml b/pubspec.yaml index 6073d4d..9bc0c78 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,7 +9,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - camera: ^0.9.4+5 + collection: ^1.15.0 device_info: ^2.0.0 firebase_core: ^1.10.5 From 26f003e6f60ed72dff78cca8c1d6f5cbbbf8a8e8 Mon Sep 17 00:00:00 2001 From: subramanian42 <88108372+subramanian42@users.noreply.github.com> Date: Fri, 17 Dec 2021 17:25:37 +0530 Subject: [PATCH 7/8] changed dependencies version --- example/pubspec.lock | 56 ++++++++++++++++++++++++++++++++++++++++++ pubspec.lock | 58 +++++++++++++++++++++++++++++++++++++++++++- pubspec.yaml | 2 +- 3 files changed, 114 insertions(+), 2 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 14b2bcd..f249575 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -15,6 +15,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + camera: + dependency: transitive + description: + name: camera + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.4+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + camera_web: + dependency: transitive + description: + name: camera_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.1+1" characters: dependency: transitive description: @@ -43,6 +64,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" + cross_file: + dependency: transitive + description: + name: cross_file + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.2" cupertino_icons: dependency: "direct main" description: @@ -118,6 +146,13 @@ packages: relative: true source: path version: "3.0.1" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" flutter_test: dependency: "direct dev" description: flutter @@ -212,6 +247,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.4" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.1" platform: dependency: transitive description: @@ -233,6 +275,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.2.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1+1" sky_engine: dependency: transitive description: flutter @@ -259,6 +308,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" string_scanner: dependency: transitive description: diff --git a/pubspec.lock b/pubspec.lock index ec32fa8..63c09eb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -15,6 +15,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + camera: + dependency: "direct main" + description: + name: camera + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.4+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + camera_web: + dependency: transitive + description: + name: camera_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.1+1" characters: dependency: transitive description: @@ -43,6 +64,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" + cross_file: + dependency: transitive + description: + name: cross_file + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.2" device_info: dependency: "direct main" description: @@ -104,6 +132,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" flutter_test: dependency: "direct dev" description: flutter @@ -184,6 +219,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.0" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.1" platform: dependency: transitive description: @@ -205,6 +247,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.2.1" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1+1" sky_engine: dependency: transitive description: flutter @@ -231,6 +280,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" string_scanner: dependency: transitive description: @@ -289,4 +345,4 @@ packages: version: "0.2.0" sdks: dart: ">=2.14.0 <3.0.0" - flutter: ">=1.20.0" + flutter: ">=2.5.0" diff --git a/pubspec.yaml b/pubspec.yaml index 9bc0c78..670067c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,7 +9,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - + camera: ^0.9.4+3 collection: ^1.15.0 device_info: ^2.0.0 firebase_core: ^1.10.5 From 9fbac09684eeaef978fb1a331915fdced798b201 Mon Sep 17 00:00:00 2001 From: subramanian42 <88108372+subramanian42@users.noreply.github.com> Date: Wed, 22 Dec 2021 15:00:46 +0530 Subject: [PATCH 8/8] changes to the camera dependency --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 670067c..6073d4d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,7 +9,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - camera: ^0.9.4+3 + camera: ^0.9.4+5 collection: ^1.15.0 device_info: ^2.0.0 firebase_core: ^1.10.5