A flutter plugin that implements google's standalone ml kit

Overview

Google's ML Kit Flutter Plugin

Pub Version

A Flutter plugin to use Google's standalone ML Kit for Android and iOS.

Features

Vision

Feature Android iOS
Text Recognition
Face Detection
Pose Detection
Selfie Segmentation yet yet
Barcode Scanning
Image Labelling
Object Detection and Tracking yet
Digital Ink Recognition
Text Detector V2 yet

Natural Language

Feature Android iOS
Language Identification
On-Device Translation yet
Smart Reply yet
Entity Extraction yet

Requirements

iOS

  • Minimum iOS Deployment Target: 10.0
  • Xcode 12 or newer
  • Swift 5
  • ML Kit only supports 64-bit architectures (x86_64 and arm64). Check this list to see if your device has the required device capabilities.

Since ML Kit does not support 32-bit architectures (i386 and armv7) (Read mode), you need to exclude amrv7 architectures in Xcode in order to run flutter build ios or flutter build ipa.

Go to Project > Runner > Building Settings > Excluded Architectures > Any SDK > armv7

Then your Podfile should look like this:

Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']) config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion end end end end ">
# add this line:
$iOSVersion = '10.0'

post_install do |installer|
  # add these lines:
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
  end
  
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    
    # add these lines:
    target.build_configurations.each do |config|
      if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
      end
    end
    
  end
end

Notice that the minimum IPHONEOS_DEPLOYMENT_TARGET is 10.0, you can set it to something newer but not older.

Android

  • minSdkVersion: 21
  • targetSdkVersion: 29

Usage

Add this plugin as dependency in your pubspec.yaml.

  • In your project-level build.gradle file, make sure to include Google's Maven repository in both your buildscript and allprojects sections(for all api's).

  • All API's except Image Labeling, Face Detection and Barcode Scanning use bundled models, hence others should work out of the box.

  • For API's using unbundled models, configure your application to download the model to your device automatically from play store by adding the following to your app's AndroidManifest.xml, if not configured the respective models will be downloaded when the API's are invoked for the first time.

    ">
    <meta-data
            android:name="com.google.mlkit.vision.DEPENDENCIES"
            android:value="ica" />
        

    Use these options:

    • ica - Image Labeling
    • ocr - Barcode Scanning
    • face -Face Detection

1. Create an InputImage

From path:

final inputImage = InputImage.fromFilePath(filePath);

From file:

final inputImage = InputImage.fromFile(file);

From bytes:

final inputImage = InputImage.fromBytes(bytes: bytes, inputImageData: inputImageData);

From CameraImage (if you are using the camera plugin):

final camera; // your camera instance
final WriteBuffer allBytes = WriteBuffer();
for (Plane plane in cameraImage.planes) {
  allBytes.putUint8List(plane.bytes);
}
final bytes = allBytes.done().buffer.asUint8List();

final Size imageSize = Size(cameraImage.width.toDouble(), cameraImage.height.toDouble());

final InputImageRotation imageRotation =
    InputImageRotationMethods.fromRawValue(camera.sensorOrientation) ??
        InputImageRotation.Rotation_0deg;

final InputImageFormat inputImageFormat =
    InputImageFormatMethods.fromRawValue(cameraImage.format.raw) ??
        InputImageFormat.NV21;

final planeData = cameraImage.planes.map(
  (Plane plane) {
    return InputImagePlaneMetadata(
      bytesPerRow: plane.bytesPerRow,
      height: plane.height,
      width: plane.width,
    );
  },
).toList();

final inputImageData = InputImageData(
  size: imageSize,
  imageRotation: imageRotation,
  inputImageFormat: inputImageFormat,
  planeData: planeData,
);

final inputImage = InputImage.fromBytes(bytes: bytes, inputImageData: inputImageData);

2. Create an instance of detector

// vision
final barcodeScanner = GoogleMlKit.vision.barcodeScanner();
final digitalInkRecogniser = GoogleMlKit.vision.digitalInkRecogniser();
final faceDetector = GoogleMlKit.vision.faceDetector();
final imageLabeler = GoogleMlKit.vision.imageLabeler();
final poseDetector = GoogleMlKit.vision.poseDetector();
final textDetector = GoogleMlKit.vision.textDetector();
final objectDetector = GoogleMlKit.vision.objectDetector(CustomObjectDetectorOptions or ObjectDetectorOptions);

// nl
final entityExtractor = GoogleMlKit.nlp.entityExtractor();
final languageIdentifier = GoogleMlKit.nlp.languageIdentifier();
final onDeviceTranslator = GoogleMlKit.nlp.onDeviceTranslator();
final smartReply = GoogleMlKit.nlp.smartReply();

// managing models
final translateLanguageModelManager = GoogleMlKit.nlp.translateLanguageModelManager();
final entityModelManager = GoogleMlKit.nlp.entityModelManager();
final remoteModelManager = GoogleMlKit.vision.remoteModelManager();

3. Call the corresponding method

// vision
final List<Barcode> barcodes = await barcodeScanner.processImage(inputImage);
final List<RecognitionCandidate> canditates = await digitalInkRecogniser.readText(points, languageTag);
final List<Face> faces = await faceDetector.processImage(inputImage);
final List<ImageLabel> labels = await imageLabeler.processImage(inputImage);
final List<Pose> poses = await poseDetector.processImage(inputImage);
final RecognisedText recognisedText = await textDetector.processImage(inputImage);
final List<DetectedObject> objects = await objectDetector.processImage(inputImage);

// nl
final List<EntityAnnotation> entities = await entityExtractor.extractEntities(text, filters, locale, timezone);
final bool response = await entityModelManager.downloadModel(modelTag);
final String response = await entityModelManager.isModelDownloaded(modelTag);
final String response = await entityModelManager.deleteModel(modelTag);
final List<String> availableModels = await entityModelManager.getAvailableModels();
try {
  final String response = await languageIdentifier.identifyLanguage(text);
} on PlatformException catch (pe) {
  if (pe.code == languageIdentifier.errorCodeNoLanguageIdentified) {
    // no language detected
  }
  // other plugin error
}
try {
  final List<IdentifiedLanguage> response = await languageIdentifier.identifyPossibleLanguages(text);
} on PlatformException catch (pe) {
  if (pe.code == languageIdentifier.errorCodeNoLanguageIdentified) {
    // no language detected
  }
  // other plugin error
}
final String response = await onDeviceTranslator.translateText(text);
final bool response = await translateLanguageModelManager.downloadModel(modelTag);
final String response = await translateLanguageModelManager.isModelDownloaded(modelTag);
final String response = await translateLanguageModelManager.deleteModel(modelTag);
final List<String> availableModels = await translateLanguageModelManager.getAvailableModels();
final List<SmartReplySuggestion> suggestions = await smartReply.suggestReplies();
// add conversations for suggestions
smartReply.addConversationForLocalUser(text);
smartReply.addConversationForRemoteUser(text, userID);

4. Extract data from response.

a. Extract barcodes.

for (Barcode barcode in barcodes) {
  final BarcodeType type = barcode.type;
  final Rect boundingBox = barcode.value.boundingBox;
  final String displayValue = barcode.value.displayValue;
  final String rawValue = barcode.value.rawValue;

  // See API reference for complete list of supported types
  switch (type) {
    case BarcodeType.wifi:
      BarcodeWifi barcodeWifi = barcode.value;
      break;
    case BarcodeValueType.url:
      BarcodeUrl barcodeUrl = barcode.value;
      break;
  }
}

b. Extract faces.

for (Face face in faces) {
  final Rect boundingBox = face.boundingBox;

  final double rotY = face.headEulerAngleY; // Head is rotated to the right rotY degrees
  final double rotZ = face.headEulerAngleZ; // Head is tilted sideways rotZ degrees

  // If landmark detection was enabled with FaceDetectorOptions (mouth, ears,
  // eyes, cheeks, and nose available):
  final FaceLandmark leftEar = face.getLandmark(FaceLandmarkType.leftEar);
  if (leftEar != null) {
    final Point<double> leftEarPos = leftEar.position;
  }

  // If classification was enabled with FaceDetectorOptions:
  if (face.smilingProbability != null) {
    final double smileProb = face.smilingProbability;
  }

  // If face tracking was enabled with FaceDetectorOptions:
  if (face.trackingId != null) {
    final int id = face.trackingId;
  }
}

c. Extract labels.

for (ImageLabel label in labels) {
  final String text = label.text;
  final int index = label.index;
  final double confidence = label.confidence;
}

d. Extract text.

String text = recognisedText.text;
for (TextBlock block in recognisedText.blocks) {
  final Rect rect = block.rect;
  final List<Offset> cornerPoints = block.cornerPoints;
  final String text = block.text;
  final List<String> languages = block.recognizedLanguages;

  for (TextLine line in block.lines) {
    // Same getters as TextBlock
    for (TextElement element in line.elements) {
      // Same getters as TextBlock
    }
  }
}

e. Pose detection

for (Pose pose in poses) {
  // to access all landmarks
  pose.landmarks.forEach((_, landmark) {
    final type = landmark.type;
    final x = landmark.x;
    final y = landmark.y;
  }
  
  // to access specific landmarks
  final landmark = pose.landmarks[PoseLandmarkType.nose];
}

f. Digital Ink Recognition

for (final candidate in candidates) {
  final text = candidate.text;
  final score = candidate.score;
}

g. Extract Suggestions

//status implications
//1 = Language Not Supported
//2 = Can't determine a reply
//3 = Successfully generated 1-3 replies
int status = result['status'];

List<SmartReplySuggestion> suggestions = result['suggestions'];

h. Extract Objects

for(DetectedObject detectedObject in _objects){
  final rect = detectedObject.getBoundinBox();
  final trackingId = detectedObject.getTrackingId();

  for(Label label in detectedObject.getLabels()){
    print('${label.getText()} ${label.getConfidence()}');
  }
}

5. Release resources with close().

// vision
barcodeScanner.close();
digitalInkRecogniser.close();
faceDetector.close();
imageLabeler.close();
poseDetector.close();
textDetector.close();
objectDetector.close();

// nl
entityExtractor.close();
languageIdentifier.close();
onDeviceTranslator.close();
smartReply.close();

Example app

Look at this example to see the plugin in action.

Migrating from ML Kit for Firebase

When Migrating from ML Kit for Firebase read this guide. For Android details read this. For iOS details read this.

Known issues

Android

To reduce the apk size read more about it in issue #26. Also look at this.

iOS

If you are using this plugin in your app and any other plugin that requires Firebase, there is a known issues you will encounter a dependency error when running pod install. To read more about it go to issue #27.

Contributing

Contributions are welcome. In case of any problems open an issue. Create a issue before opening a pull request for non trivial fixes. In case of trivial fixes open a pull request directly.

License

MIT

Comments
  • Increased App Size

    Increased App Size

    After implementing google_ml_kit, the app size is increased by ~85 MB in debug mode and ~44 MB in release mode. I investigated this with the app size tool and found that all models/resources are always included, even if they are not used. So it would be great to be able to configure which resources are used and and which can be excluded.

    The firebase_ml_vision plugin had the same issue (https://github.com/FirebaseExtended/flutterfire/issues/4767) and I was able to adapt the workaround of excluding unused resources to google_ml_kit and wanted to share it. In my case I am currently only using the language detection feature therefore I don't need pose detection, etc.

    The workaround for Android looks like that and increases the app size by less than 3 MB:

    android {
    
        // some other code 
    
        buildTypes {
            release {
                // some other code 
    
                aaptOptions {
                    ignoreAssetsPattern '!mlkit_pose:!mlkit_label_default_model:'
                }
            }
            debug {
                // some other code 
    
                aaptOptions {
                    ignoreAssetsPattern '!mlkit_pose:!mlkit_label_default_model:'
                }
            }
        }
    
        packagingOptions {
            exclude 'lib/**/libtranslate_jni.so'
            exclude 'lib/**/libdigitalink.so'
            exclude 'lib/**/libxeno_native.so'
            exclude 'lib/**/libmlkitcommonpipeline.so'
            exclude 'lib/**/libbarhopper_v2.so'
            exclude 'lib/**/libclassifier_jni.so'
            exclude 'lib/**/libface_detector_v2_jni.so'
            exclude 'lib/**/libtensorflowlite_jni.so'
            // exclude 'lib/**/liblanguage_id_jni.so' → required for language detection
        }
    

    Since a workaround does exist, this is not a pressing issue, but I think many developers would appreciate some sort of configuration option :)

    opened by lks-nbg 49
  • Definition of 'MLKText' must be imported from module 'MLKitTextRecognitionCommon.MLKText' before it is required

    Definition of 'MLKText' must be imported from module 'MLKitTextRecognitionCommon.MLKText' before it is required

    When building on iOS I am getting 5 errors:

    1. "Declaration of 'MLKTextRecognizedLanguage' must be imported from module 'MLKitTextRecognitionCommon.MLKTextRecognizedLanguage' before it is required"
    2. "Definition of 'MLKText' must be imported from module 'MLKitTextRecognitionCommon.MLKText' before it is required"
    3. "Definition of 'MLKTextBlock' must be imported from module 'MLKitTextRecognitionCommon.MLKTextBlock' before it is required"
    4. "Definition of 'MLKTextLine' must be imported from module 'MLKitTextRecognitionCommon.MLKTextLine' before it is required"
    5. "Definition of 'MLKTextElement' must be imported from module 'MLKitTextRecognitionCommon.MLKTextElement' before it is required"

    I've tried both 0.6.0 and 0.7.0 versions of the plugin. flutter clean does not help.

    opened by sinshev 31
  • [Face Detection] Galaxy Tab A7 face recognition doesn't work

    [Face Detection] Galaxy Tab A7 face recognition doesn't work

    Bug report

    Describe the bug I ran the example of face recognition feature on Android "Mobile Phone" & it worked probably. Also I've even tried it on another tablet "Galaxy Tab A -SM-T295" and it worked just fine. But when I'm trying it on "Galaxy Tab A7 - SM-T505N" It doesn't even work or even give any error, it just keep telling me there is 0 faces, but when I choose to take image from camera or gallery it works fine. Have been trying all orientations, rotations, landscape modes, portrait modes but nothing really works.

    Steps to reproduce

    Steps to reproduce the behavior:

    Run Example on "Galaxy Tab A7 - SM-T505N" and it won't work

    Expected behavior

    That it would work fine

    Flutter doctor

    Click To Expand

    [√] Flutter (Channel stable, 2.0.1, on Microsoft Windows [Version 10.0.18363.1646], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.0) [√] Android Studio (version 4.1.0) [√] IntelliJ IDEA Community Edition (version 2020.3) [√] VS Code (version 1.55.1) [√] Connected device (4 available)

    • No issues found!


    Flutter dependencies

    Click To Expand
    • animated_text_kit 2.5.4 [flutter characters]
    • camera 0.5.8+17 [flutter]
    • cupertino_icons 0.1.3
    • firebase_core 1.0.1 [firebase_core_platform_interface firebase_core_web flutter meta]
    • firebase_messaging 10.0.2 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
    • firebase_ml_vision 0.12.0 [flutter]
    • flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
    • http 0.12.2 [http_parser path pedantic]
    • image 2.1.19 [archive xml meta]
    • intl 0.17.0 [clock path]
    • lottie 0.6.0 [flutter archive characters charcode collection logging meta path vector_math]
    • native_device_orientation 1.0.0 [flutter meta]
    • path 1.8.0
    • path_drawing 0.4.1+1 [vector_math meta path_parsing flutter]
    • path_provider 2.0.2 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
    • provider 4.3.3 [collection flutter nested]
    • qr_code_scanner 0.4.0 [flutter]
    • qr_flutter 3.2.0 [flutter qr]
    • screen 0.0.5 [flutter]
    • shared_preferences 2.0.6 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows]

    dev dependencies:

    • flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]

    dependency overrides:

    • firebase_core 1.0.1 [firebase_core_platform_interface firebase_core_web flutter meta]
    • firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface]
    • firebase_core_web 1.0.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]

    transitive dependencies:

    • archive 2.0.13 [crypto args path]
    • args 1.6.0
    • async 2.5.0 [collection]
    • boolean_selector 2.1.0 [source_span string_scanner]
    • characters 1.1.0
    • charcode 1.2.0
    • clock 1.1.0
    • collection 1.15.0
    • convert 2.1.1 [charcode typed_data]
    • crypto 2.1.5 [collection convert typed_data]
    • fake_async 1.2.0 [clock collection]
    • ffi 1.1.2
    • file 6.1.2 [meta path]
    • firebase_messaging_platform_interface 3.0.2 [firebase_core flutter meta plugin_platform_interface]
    • firebase_messaging_web 2.0.2 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
    • flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
    • http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
    • js 0.6.3
    • logging 0.11.4
    • matcher 0.12.10 [stack_trace]
    • meta 1.3.0
    • nested 1.0.0 [flutter]
    • path_parsing 0.1.4 [vector_math meta]
    • path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter]
    • path_provider_macos 2.0.0 [flutter]
    • path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface]
    • path_provider_windows 2.0.1 [path_provider_platform_interface meta path flutter ffi win32]
    • pedantic 1.11.1
    • petitparser 3.1.0 [meta]
    • platform 3.0.0
    • plugin_platform_interface 2.0.0 [meta]
    • process 4.2.1 [file path platform]
    • qr 1.3.0 [meta]
    • shared_preferences_linux 2.0.0 [flutter file meta path path_provider_linux shared_preferences_platform_interface]
    • shared_preferences_macos 2.0.0 [shared_preferences_platform_interface flutter]
    • shared_preferences_platform_interface 2.0.0 [flutter]
    • shared_preferences_web 2.0.0 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
    • shared_preferences_windows 2.0.0 [shared_preferences_platform_interface flutter file meta path path_provider_platform_interface path_provider_windows]
    • sky_engine 0.0.99
    • source_span 1.8.0 [charcode collection path term_glyph]
    • stack_trace 1.10.0 [path]
    • stream_channel 2.1.0 [async]
    • string_scanner 1.1.0 [charcode source_span]
    • term_glyph 1.2.0
    • test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
    • typed_data 1.3.0 [collection]
    • vector_math 2.1.0
    • win32 2.0.5 [ffi]
    • xdg_directories 0.2.0 [meta path process]
    • xml 4.5.1 [collection convert meta petitparser]

    opened by MahmouedInit 29
  • Ios GoogleDataTransport dependency error when using firebase_crashlytics

    Ios GoogleDataTransport dependency error when using firebase_crashlytics

    Hello,

    Im my project I have a these two dependencies:

    google_ml_kit: 0.4.0 firebase_analytics: ^8.0.3 firebase_crashlytics: ^2.0.4

    On android this works perfectly :)

    But on on IOS when trying to use pod install I have this error:

    [!] CocoaPods could not find compatible versions for pod "GoogleDataTransport": In snapshot (Podfile.lock): GoogleDataTransport (= 9.0.0, ~> 9.0)

    In Podfile: firebase_crashlytics (from .symlinks/plugins/firebase_crashlytics/ios) was resolved to 2.0.4, which depends on Firebase/Crashlytics (= 8.0.0) was resolved to 8.0.0, which depends on FirebaseCrashlytics (~> 8.0.0) was resolved to 8.0.0, which depends on GoogleDataTransport (~> 9.0)

    google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.0.1, which depends on
      GoogleMLKit/ImageLabeling was resolved to 0.60.0, which depends on
        GoogleMLKit/MLKitCore (= 0.60.0) was resolved to 0.60.0, which depends on
          MLKitCommon (~> 0.60.0) was resolved to 0.60.0, which depends on
            GoogleDataTransport (~> 3.2)
    

    Is there a way to have google_ml_kit depending on a on higher version of GoogleDataTransport or any way to go around this issue ?

    Thank you in advance

    opened by HakimKramdi 29
  • Unbale to found any helping material Live Camera with Pose Detection API using flutter dart.

    Unbale to found any helping material Live Camera with Pose Detection API using flutter dart.

    I am facing an issue not found any example where Live Camera implemented with Pose Detection API using flutter dart.

    Please let me know anyone using it or found any helping material related this i am just found Pose Detection using static image but not using Live Camera..

    Thanks

    opened by marslannasr7koncepts 24
  • Dependency conflict with flutterfire (firebase - google_mlkit_face_detection) [GTMSessionFetcher/Core]

    Dependency conflict with flutterfire (firebase - google_mlkit_face_detection) [GTMSessionFetcher/Core]

    Hello, flutterfire released a major update, 4 days ago. after updating firebase libs I got the error below:

        [!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
          In Podfile:
            firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.0.2, which depends on
              Firebase/Auth (= 10.0.0) was resolved to 10.0.0, which depends on
                FirebaseAuth (~> 10.0.0) was resolved to 10.0.0, which depends on
                  GTMSessionFetcher/Core (~> 2.1)
    
            google_mlkit_face_detection (from `.symlinks/plugins/google_mlkit_face_detection/ios`) was resolved to 0.4.0, which depends on
              GoogleMLKit/FaceDetection (~> 3.2.0) was resolved to 3.2.0, which depends on
                MLKitFaceDetection (~> 2.2.0) was resolved to 2.2.0, which depends on
                  MLKitVision (~> 4.2) was resolved to 4.2.0, which depends on
                    GTMSessionFetcher/Core (~> 1.1)
    

    I've updated the face_detection package but error still occurs, in pubspec.yaml

      firebase_auth: ^4.0.2
      firebase_core: ^2.1.0
      google_mlkit_face_detection:
        git:
          url: https://github.com/bharat-biradar/Google-Ml-Kit-plugin.git
          ref: f8edf95e85e74778be2b7f082b367f4a086e503f
          path: packages/google_mlkit_face_detection
    

    flutterfire side: https://github.com/firebase/flutterfire/commit/9627c56a37d657d0250b6f6b87d0fec1c31d4ba3 https://github.com/firebase/flutterfire/pull/9708

    flutter doctor:

    [✓] Flutter (Channel stable, 3.3.5, on macOS 12.6 21G115 darwin-arm, locale en-US)
    [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    [✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    [✓] Android Studio (version 2021.3)
    [✓] Android Studio (version 2021.2)
    [✓] VS Code (version 1.72.2)
    [✓] Connected device (2 available)
    [✓] HTTP Host Availability
    

    Are you planning any update update to resolve conflict, or should I rollback FIR update and wait for a while? Do you any advice to workaround? Thanks.

    Firebase 
    opened by phiyale 23
  • TextRecognizer works ok on Android but the result letters are all corrupted on iOS

    TextRecognizer works ok on Android but the result letters are all corrupted on iOS

    Hi,

    I got recommended to use google_mlkit_text_recognition instead of google_ml_kit as followes https://github.com/bharat-biradar/Google-Ml-Kit-plugin/issues/207

    However, it still works ok on Android but not on iOS using google_mlkit_text_recognition as using google_ml_kit

    recognizedText.text look ok on Android but the letters in it are all corrupted on iOS For now, I need only English TextRecognizer

    import 'package:google_mlkit_text_recognition/google_mlkit_text_recognition.dart';
    
    textRecognizer = TextRecognizer(script: TextRecognitionScript.latin);
    final File? imageFile = await getImage(ImageSource.gallery);
    
    if(imageFile != null) {
      final inputImage = InputImage.fromFile(imageFile);
      final RecognizedText recognizedText = await textRecognizer.processImage(inputImage);
    
      String text = recognizedText.text;
      print('${this.className} extractText : ' + text);
    

    }

    google_mlkit_text_recognition 0.0.1

    My development environment is as followes iOS 14.7.1 Xcode 13.3

    Please help me to solve this issue Thanks in advance

    opened by kodol73 19
  • Once I added this package to the project the image_picker package stopped working !!

    Once I added this package to the project the image_picker package stopped working !!

    once I added this package, I wasn't able to select images anymore by image_picker I tried with several projects. the gallery will open but the image will return nul, I don't know why but that what happening

    Out of scope 
    opened by hassanyassiin 15
  • iOS - App Crashes When Using RecognisedText

    iOS - App Crashes When Using RecognisedText

    I am trying to run a simple program that takes an image from a user's gallery and converts it into text. 'imageToText()' takes an image as input and is supposed to parse the detected text. As of now the program is able to print "loaded textDetector" but then immediately crashes when trying to set up the recognisedText object as shown below the code.

    I have also included the Xcode Output that I get when trying to run the app on a physical device. I am not sure what the error could be at this point as I have followed everything in the official package documentation. Any help would be greatly appreciated since I've been stuck on this for days.

    imageToText()
        Future imageToText(inputImage) async {
          print("starting");
          result = '';
      
          final textDetector = GoogleMlKit.vision.textDetector();
          print("loaded textDetector");
          final RecognisedText recognisedText = await textDetector.processImage(inputImage);
          print("loaded recognisedText");
      
          setState(() {
            String text = recognisedText.text;
            for (TextBlock block in recognisedText.blocks) {
              //each block of text/section of text
              final String text = block.text;
              print("block of text: ");
              print(text);
              for (TextLine line in block.lines) {
                //each line within a text block
                for (TextElement element in line.elements) {
                  //each word within a line
                  result += element.text + " ";
                }
              }
            }
            result += "\n\n";
          });
      }
    
    Screen Shot 2022-01-13 at 2 08 26 PM
    XCode Output 2022-01-13 13:53:48.202214-0500 Runner[21400:1972252] Metal GPU Frame Capture Enabled 2022-01-13 13:53:48.202333-0500 Runner[21400:1972252] Metal API Validation Enabled 2022-01-13 13:53:48.599642-0500 Runner[21400:1972526] flutter: Observatory listening on http://127.0.0.1:56271/miwaCqXFTX8=/ 2022-01-13 13:53:49.561937-0500 Runner[21400:1972513] fopen failed for data file: errno = 2 (No such file or directory) 2022-01-13 13:53:49.561998-0500 Runner[21400:1972513] Errors found! Invalidating cache... 2022-01-13 13:53:49.713065-0500 Runner[21400:1972513] fopen failed for data file: errno = 2 (No such file or directory) 2022-01-13 13:53:49.713167-0500 Runner[21400:1972513] Errors found! Invalidating cache... 2022-01-13 13:53:57.278499-0500 Runner[21400:1972499] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)"" 2022-01-13 13:53:57.354180-0500 Runner[21400:1972512] flutter: starting 2022-01-13 13:53:57.354418-0500 Runner[21400:1972512] flutter: loaded textDetector 2022-01-13 13:53:57.361475-0500 Runner[21400:1972508] 8.10.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add `FirebaseApp.configure()` to your application initialization. This can be done in in the App Delegate's application(_:didFinishLaunchingWithOptions:)` (or the `@main` struct's initializer in SwiftUI). Read more: https://goo.gl/ctyzm8. 2022-01-13 13:53:57.365819-0500 Runner[21400:1972252] *** Terminating app due to uncaught exception 'FIRAppNotConfigured', reason: 'The default Firebase app instance must be configured. To configure, call `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) in the App Delegate's `application:didFinishLaunchingWithOptions:` (`application(_:didFinishLaunchingWithOptions:)` in Swift).' *** First throw call stack: (0x19d09adc0 0x1b1bf77a8 0x19cf8fe74 0x101b1efe8 0x101b2085c 0x101b207dc 0x1009d1e8c 0x1009d20dc 0x1009d25fc 0x100b369f4 0x100b35e8c 0x100b360e4 0x100b34548 0x100b343ec 0x102467bcc 0x104954e4c 0x104954cd8 0x104950418 0x107c6594c 0x1077b6120 0x107b32aec 0x107a60204 0x107a63f5c 0x19d0158c0 0x19d0154bc 0x19d01490c 0x19d00e6c0 0x19d00d9f4 0x1b46e3734 0x19fa8c75c 0x19fa91fcc 0x1009d0abc 0x19ccc9cf8) libc++abi: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'FIRAppNotConfigured', reason: 'The default Firebase app instance must be configured. To configure, call `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) in the App Delegate's `application:didFinishLaunchingWithOptions:` (`application(_:didFinishLaunchingWithOptions:)` in Swift).' terminating with uncaught exception of type NSException (lldb) ` 2022-01-13 13:53:48.202214-0500 Runner[21400:1972252] Metal GPU Frame Capture Enabled 2022-01-13 13:53:48.202333-0500 Runner[21400:1972252] Metal API Validation Enabled 2022-01-13 13:53:48.599642-0500 Runner[21400:1972526] flutter: Observatory listening on http://127.0.0.1:56271/miwaCqXFTX8=/ 2022-01-13 13:53:49.561937-0500 Runner[21400:1972513] fopen failed for data file: errno = 2 (No such file or directory) 2022-01-13 13:53:49.561998-0500 Runner[21400:1972513] Errors found! Invalidating cache... 2022-01-13 13:53:49.713065-0500 Runner[21400:1972513] fopen failed for data file: errno = 2 (No such file or directory) 2022-01-13 13:53:49.713167-0500 Runner[21400:1972513] Errors found! Invalidating cache... 2022-01-13 13:53:57.278499-0500 Runner[21400:1972499] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)"" 2022-01-13 13:53:57.354180-0500 Runner[21400:1972512] flutter: starting 2022-01-13 13:53:57.354418-0500 Runner[21400:1972512] flutter: loaded textDetector 2022-01-13 13:53:57.361475-0500 Runner[21400:1972508] 8.10.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add `FirebaseApp.configure()` to your application initialization. This can be done in in the App Delegate's application(_:didFinishLaunchingWithOptions:)` (or the `@main` struct's initializer in SwiftUI). Read more: https://goo.gl/ctyzm8. 2022-01-13 13:53:57.365819-0500 Runner[21400:1972252] *** Terminating app due to uncaught exception 'FIRAppNotConfigured', reason: 'The default Firebase app instance must be configured. To configure, call `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) in the App Delegate's `application:didFinishLaunchingWithOptions:` (`application(_:didFinishLaunchingWithOptions:)` in Swift).' *** First throw call stack: (0x19d09adc0 0x1b1bf77a8 0x19cf8fe74 0x101b1efe8 0x101b2085c 0x101b207dc 0x1009d1e8c 0x1009d20dc 0x1009d25fc 0x100b369f4 0x100b35e8c 0x100b360e4 0x100b34548 0x100b343ec 0x102467bcc 0x104954e4c 0x104954cd8 0x104950418 0x107c6594c 0x1077b6120 0x107b32aec 0x107a60204 0x107a63f5c 0x19d0158c0 0x19d0154bc 0x19d01490c 0x19d00e6c0 0x19d00d9f4 0x1b46e3734 0x19fa8c75c 0x19fa91fcc 0x1009d0abc 0x19ccc9cf8) libc++abi: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'FIRAppNotConfigured', reason: 'The default Firebase app instance must be configured. To configure, call `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) in the App Delegate's `application:didFinishLaunchingWithOptions:` (`application(_:didFinishLaunchingWithOptions:)` in Swift).' terminating with uncaught exception of type NSException (lldb)
    Podfile
      # Uncomment this line to define a global platform for your project
      platform :ios, '10.0'
      
      # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
      ENV['COCOAPODS_DISABLE_STATS'] = 'true'
      
      project 'Runner', {
        'Debug' => :debug,
        'Profile' => :release,
        'Release' => :release,
      }
      
      def flutter_root
        generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
        unless File.exist?(generated_xcode_build_settings_path)
          raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
        end
      
        File.foreach(generated_xcode_build_settings_path) do |line|
          matches = line.match(/FLUTTER_ROOT\=(.*)/)
          return matches[1].strip if matches
        end
        raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
      end
      
      require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
      
      flutter_ios_podfile_setup
      
      target 'Runner' do
        use_frameworks!
        use_modular_headers!
      
        flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
        pod 'GoogleMLKit/TextRecognition'
      end
      
      post_install do |installer|
        # add these lines:
        installer.pods_project.build_configurations.each do |config|
          config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
        end
      
        installer.pods_project.targets.each do |target|
          flutter_additional_ios_build_settings(target)
      
          # add these lines:
          target.build_configurations.each do |config|
            if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
              config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
            end
          end
        end
      end
    
    
    
    
    opened by prafull2001 15
  • getting this weird platform exception & NoClassDefFoundError whenever I tried to update google ml kit

    getting this weird platform exception & NoClassDefFoundError whenever I tried to update google ml kit

    I got this weird error where my face detector app working just fine on the beginning and then crashed after Im running pub update.

    here's some thing I notice

    PlatformException(error, Image dimension, ByteBuffer size and format don't match. Please check if the ByteBuffer is in the decalred format., null, java.lang.IllegalArgumentException: Image dimension, ByteBuffer size and format don't match. Please check if the ByteBuffer is in the decalred format.
    	at com.google.android.gms.common.internal.Preconditions.checkArgument(com.google.android.gms:play-services-basement@@18.0.0:2)
    	at com.google.mlkit.vision.common.InputImage.<init>(com.google.mlkit:vision-common@@17.0.0:8)
    	at com.google.mlkit.vision.common.InputImage.fromByteArray(com.google.mlkit:vision-common@@17.0.0:2)
    	at com.b.biradar.google_ml_kit.vision.InputImageConverter.getInputImageFromData(InputImageConverter.java:36)
    	at com.b.biradar.google_ml_kit.vision.FaceDetector.handleDetection(FaceDetector.java:62)
    	at com.b.biradar.google_ml_kit.vision.FaceDetector.onMethodCall(FaceDetector.java:51)
    	at com.b.biradar.google_ml_kit.MlKitMethodCallHandler.onMethodCall(MlKitMethodCallHandler.java:62)
    	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
    	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
    	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
    	at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(Unknown Source:12)
    	at android.os.Handler.handleCallback(Handler.java:883)
    	at android.os.Handler.dispatchMessage(Handler.java:100)
    	at android.os.Looper.loop(Looper.java:227)
    	at android.app.ActivityThread.main(ActivityThread.java:7822)
    	at java.lang.reflect.Method.invoke(Native Method)
    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
    )
    
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/mlkit/vision/common/internal/Detector;
    E/AndroidRuntime(29779): 	at com.b.biradar.google_ml_kit.MlKitMethodCallHandler.<init>(MlKitMethodCallHandler.java:34)
    E/AndroidRuntime(29779): 	at com.b.biradar.google_ml_kit.GoogleMlKitPlugin.onAttachedToEngine(GoogleMlKitPlugin.java:28)
    E/AndroidRuntime(29779): 	at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.add(FlutterEngineConnectionRegistry.java:145)
    E/AndroidRuntime(29779): 	at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:104)
    E/AndroidRuntime(29779): 	at java.lang.reflect.Method.invoke(Native Method)
    E/AndroidRuntime(29779): 	at io.flutter.embedding.engine.plugins.util.GeneratedPluginRegister.registerGeneratedPlugins(GeneratedPluginRegister.java:80)
    E/AndroidRuntime(29779): 	at io.flutter.embedding.android.FlutterActivity.configureFlutterEngine(FlutterActivity.java:1009)
    E/AndroidRuntime(29779): 	at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:199)
    E/AndroidRuntime(29779): 	at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:459)
    E/AndroidRuntime(29779): 	at android.app.Activity.performCreate(Activity.java:7969)
    E/AndroidRuntime(29779): 	at android.app.Activity.performCreate(Activity.java:7958)
    E/AndroidRuntime(29779): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
    E/AndroidRuntime(29779): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3505)
    E/AndroidRuntime(29779): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3689)
    E/AndroidRuntime(29779): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
    E/AndroidRuntime(29779): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140)
    E/AndroidRuntime(29779): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100)
    E/AndroidRuntime(29779): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2239)
    E/AndroidRuntime(29779): 	at android.os.Handler.dispatchMessage(Handler.java:107)
    E/AndroidRuntime(29779): 	at android.os.Looper.loop(Looper.java:227)
    E/AndroidRuntime(29779): 	at android.app.ActivityThread.main(ActivityThread.java:7822)
    E/AndroidRuntime(29779): 	at java.lang.reflect.Method.invoke(Native Method)
    E/AndroidRuntime(29779): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    E/AndroidRuntime(29779): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
    E/AndroidRuntime(29779): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.mlkit.vision.common.internal.Detector" on path: DexPathList[[zip file "/data/app/com.banuacoders.donggala.siap-dDHCwvOeRx_HKGaNiIvxNw==/base.apk"],nativeLibraryDirectories=[/data/app/com.banuacoders.donggala.siap-dDHCwvOeRx_HKGaNiIvxNw==/lib/arm64, /data/app/com.banuacoders.donggala.siap-dDHCwvOeRx_HKGaNiIvxNw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
    E/AndroidRuntime(29779): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
    E/AndroidRuntime(29779): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    E/AndroidRuntime(29779): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    E/AndroidRuntime(29779): 	... 24 more
    

    I'm using the latest version and trying to downgrade it to version 5 and still got the same error

    opened by ryanaidilp 13
  • [Text Recognition] Failed to do OCR while trying to start camera. - Android

    [Text Recognition] Failed to do OCR while trying to start camera. - Android

    I'm using Text Detector and Barcode Detector, I'm able to run the app on several medium & high end devices, but when I'm trying to run on low end devices, when I click on button to open camera, it just stuck to load camera and I get the bottom error:

    E/flutter (18569): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(TextDetectorError, com.google.mlkit.common.MlKitException: Waiting for the OCR optional module to be downloaded. Please wait., null, null)
    
    
    E/flutter (18569): #0      StandardMethodCodec.decodeEnvelope
    package:flutter/…/services/message_codecs.dart:597
    E/flutter (18569): #1      MethodChannel._invokeMethod
    
    package:flutter/…/services/platform_channel.dart:158
    
    E/flutter (18569): <asynchronous suspension>
    
    E/flutter (18569): #2      TextDetector.processImage
    package:google_ml_kit/…/vision/text_detector.dart:18
    
    E/flutter (18569): <asynchronous suspension>
    

    Any help would be highly appreciated :)

    opened by SebghatYusuf 12
  • [Android]  Execution failed for task ':app:checkReleaseDuplicateClasses'.

    [Android] Execution failed for task ':app:checkReleaseDuplicateClasses'.

    Hello, first of all, thanks for the great plugin!

    Unfortunately, I am getting the following error during building the Android application (I use the text recognition package only). I believe this is happing because I use onesignal package as well, which probably uses firebase packages as well.

    iOS build is fine, but it fails on Android. I will be grateful for any info on how to work around that.

    Thanks

         Duplicate class com.google.firebase.components.Component$$Lambda$1 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.Component$$Lambda$2 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.Component$$Lambda$3 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.Component$1 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.Component$Builder found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentContainer found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentDiscovery found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentDiscovery$1 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentDiscovery$MetadataRegistrarNameRetriever found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentDiscovery$RegistrarNameRetriever found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentFactory found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentRegistrar found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentRuntime found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentRuntime$$Lambda$1 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentRuntime$$Lambda$2 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.ComponentRuntime$$Lambda$3 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.CycleDetector found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.CycleDetector$1 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.CycleDetector$ComponentNode found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.CycleDetector$Dep found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.Dependency found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.DependencyCycleException found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.DependencyException found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.EventBus found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.EventBus$$Lambda$1 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.Lazy found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.MissingDependencyException found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.RestrictedComponentContainer found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.components.RestrictedComponentContainer$RestrictedPublisher found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.events.Event found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.events.EventHandler found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.events.Publisher found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.events.Subscriber found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
         Duplicate class com.google.firebase.inject.Provider found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.1.0-runtime (com.google.firebase:firebase-components:16.1.0)
    
    opened by AndreiMisiukevich 0
  • Mediapipe pose unstable on phone compared to desktop

    Mediapipe pose unstable on phone compared to desktop

    Hi, I find the mediapipe pose to be much more unstable on the phone compared to on the desktop. For example on the phone the leg and feet keypoints move a lot whereas on the desktop they are much more stable (for the same video). Are the mediapipe models for phone and desktop different? Is there a way I can stabilize mediapipe pose on the phone? Thanks.

    opened by usmanroshan 0
  • Face Detection Not working on xiaomi redmi note 11 pro

    Face Detection Not working on xiaomi redmi note 11 pro

    we tried using a real device brand oppo and a real device brand samsung using the face detection package the results were successful, but we tried a real device brand xiaomi redmi note 11 pro, this package doesn't work, is there a solution?

    opened by dimas96maulana 0
  • How to use custom model in Digital Ink Recognizer?

    How to use custom model in Digital Ink Recognizer?

    I've tested Digital Ink Recognizer using Example app, but there's a problem with Arabic language code. I need the model to recognize harakah, and the result i get after testing it doesn't provide arabic with harakah in it. So, i was thinking this problem happens because the model was trained to use arabic without harakah in it, and in my use case i need it. Then, what if i made a new custom model and trained it to check arabic with harakah in it? How do this plugin download and use that custom model? Or is there a way checking it without making a custom model?

    opened by baraghiffari 0
Owner
Bharat Biradar
Bharat Biradar
A flutter plugin for execute dart code in background.

flutter_background_service A flutter plugin for execute dart code in background. Android No additional setting required. To change notification icon,

Eka Setiawan Saputra 160 Dec 27, 2022
A Flutter plugin that exposes Monet (Material You, Material 3) system colors on Android 12.

Monet Colors A Flutter plugin that exposes Monet (Material You, Material 3) system colors on Android 12. Returns null on unsupported platforms and lea

İhsan Işık 3 Aug 26, 2022
A flutter plugin that provides external storage path and external public storage path

ext_storage ext_storage is minimal flutter plugin that provides external storage path and external public storage path

null 0 Nov 16, 2021
Flutter WebRTC plugin Demo

Flutter WebRTC plugin Demo

null 0 Nov 19, 2021
Flutter Map plugin for ArcGIS Esri. Currently support feature layer (point, polygon)

Flutter Map plugin for ArcGIS Esri Currently support feature layer(point, polygon, polyline coming soon) We are working on more features A Dart implem

Munkh-Altai 17 Nov 9, 2022
Flutter plugin to help experiment with different Color Schemes without pain.

Random Color Scheme Making a coherent Material Design theme is hard. This is a Flutter plugin that generates a random color pallet based on Material D

Bernardo Ferrari 77 Dec 6, 2022
A Flutter plugin for XUpdate -- Android Update Library

flutter_xupdate A Flutter plugin for XUpdate -- Android Update Library。See the use Chinese Document for details。 About me WeChat public number juejin

薛翔 233 Dec 25, 2022
A Dart build script that downloads the Protobuf compiler and Dart plugin to streamline .proto to .dart compilation.

A Dart build script that downloads the Protobuf compiler and Dart plugin to streamline .proto to .dart compilation.

Julien Scholz 10 Oct 26, 2022
Flutter Version Management: A simple CLI to manage Flutter SDK versions.

fvm Flutter Version Management: A simple cli to manage Flutter SDK versions. FVM helps with the need for a consistent app builds by allowing to refere

Leo Farias 3.2k Jan 8, 2023
A flutter utility to easily create flavors in your flutter application

Flutter Flavorizr A flutter utility to easily create flavors in your flutter application Getting Started Let's start by setting up our environment in

Angelo Cassano 268 Jan 1, 2023
🔥FlutterFire is a set of Flutter plugins that enable Flutter apps to use Firebase services.

FlutterFire is a set of Flutter plugins that enable Flutter apps to use Firebase services. You can follow an example that shows how to use these plugins in the Firebase for Flutter codelab.

null 7.4k Jan 2, 2023
Ecosistema de paquetes para Dart y Flutter desarrollados y mantenidos por la comunidad de Flutter Cuba relacionados con la tienda cubana de aplicaciones para dispositivos Android llamada Apklis.

Ecosistema de paquetes para Dart y Flutter desarrollados y mantenidos por la comunidad de Flutter Cuba relacionados con la tienda cubana de aplicacion

Flutter Cuba 12 Oct 24, 2022
UME is an in-app debug kits platform for Flutter. Produced by Flutter Infra team of ByteDance

flutter_ume English Flutter 应用内调试工具平台 当前版本内置 10 个插件, 开发者可以创建自己的插件,并集成进 UME 平台。 详见本文为 UME 开发插件部分。 flutter_ume 快速接入 特别说明 功能介绍 为 UME 开发插件 版本说明 兼容性 单测覆盖率

Bytedance Inc. 1.8k Dec 30, 2022
An android application built using Flutter that computes the Body Mass Index of person and suggestion to carry ,by taking Inputs (Weight, Height, and Age), Built using Flutter

BMI Calculator ?? Our Goal The objective of this tutorial is to look at how we can customise Flutter Widgets to achieve our own beautiful user interfa

dev_allauddin 7 Nov 2, 2022
The Coolicons icon pack for Flutter with over 400 icons available for your flutter project.

coolicons This flutter package allows you to use the Coolicons icon pack. ?? Installation In the dependencies: section of your pubspec.yaml, add the f

Abada Samuel Oghenero. 35 Oct 22, 2022
An extension to the Flutter SDK for building Flutter applications for Tizen devices.

Flutter for Tizen An extension to the Flutter SDK for building Flutter applications for Tizen devices. Flutter and the related logo are trademarks of

null 356 Dec 16, 2022
Fluro is a Flutter routing library that adds flexible routing options like wildcards, named parameters and clear route definitions.

Fluro is a Flutter routing library that adds flexible routing options like wildcards, named parameters and clear route definitions.

Luke Pighetti 3.5k Jan 4, 2023
AOP for Flutter(Dart)

AspectD Salute to AspectJ. AspectD is an AOP(aspect oriented programming) framework for dart. Like other traditional aop framework, AspectD provides c

null 1k Jan 7, 2023