mlkit
A Flutter plugin to use the Firebase ML Kit.
this is not official package
The flutter team now has the firebase_ml_vision or firebase_ml_custom package for Firebase ML Kit. Please consider trying to use firebase_ml_vision.
Note: This plugin is still under development, and some APIs might not be available yet. Feedback and Pull Requests are most welcome!
Features
Feature | Android | iOS |
---|---|---|
Recognize text(on device) | ✅ | ✅ |
Recognize text(cloud) | yet | yet |
Detect faces(on device) | ✅ | ✅ |
Scan barcodes(on device) | ✅ | ✅ |
Label Images(on device) | ✅ | ✅ |
Label Images(cloud) | yet | yet |
Object detection & tracking | yet | yet |
Recognize landmarks(cloud) | yet | yet |
Language identification | ✅ | ✅ |
Translation | yet | yet |
Smart Reply | yet | yet |
AutoML model inference | yet | yet |
Custom model(on device) | ✅ | ✅ |
Custom model(cloud) | ✅ | ✅ |
What features are available on device or in the cloud?
Usage
To use this plugin, add mlkit
as a dependency in your pubspec.yaml file.
Getting Started
Check out the example
directory for a sample app using Firebase Cloud Messaging.
Android Integration
To integrate your plugin into the Android part of your app, follow these steps:
- Using the Firebase Console add an Android app to your project: Follow the assistant, download the generated
google-services.json
file and place it insideandroid/app
. Next, modify theandroid/build.gradle
file and theandroid/app/build.gradle
file to add the Google services plugin as described by the Firebase assistant.
iOS Integration
To integrate your plugin into the iOS part of your app, follow these steps:
- Using the Firebase Console add an iOS app to your project: Follow the assistant, download the generated
GoogleService-Info.plist
file, openios/Runner.xcworkspace
with Xcode, and within Xcode place the file insideios/Runner
. Don't follow the steps named "Add Firebase SDK" and "Add initialization code" in the Firebase assistant.
Dart/Flutter Integration
From your Dart code, you need to import the plugin and instantiate it: