google_mlkit_commons
1.0.3, released 8 days ago by flutter-ml.dev
Common classes and utility methods for Google's ML Kit plugins
What it does
Provides shared classes like InputImage and ModelManager that are used across Google's standalone ML Kit plugins. It handles image conversion from files, paths, bytes, and bitmaps, as well as remote model management.
AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Flutter app using Google ML Kit plugins that require an InputImage
- You need to manage downloadable remote ML models
Skip it when
- You are targeting web or platforms other than Android and iOS
- You are not using any Google ML Kit plugins
Strengths
- Provides a unified InputImage abstraction for multiple ML Kit plugins
- Simplifies camera stream integration and image format handling for Android and iOS
Weaknesses
- Limited to mobile platforms (Android and iOS)
- Relies on native platform channels with no processing done in Dart
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 0
Requires iOS deployment target 15.0 or newer, Swift Package Manager setup with specific linker flags, and Android SDK configurations.
import 'package:google_mlkit_commons/google_mlkit_commons.dart';
final inputImage = InputImage.fromFilePath(filePath);Works with
Packages commonly used together with google_mlkit_commons: ones it builds on, ones built on it, and its own family.
- google_mlkit_language_idSame familyDetermine the language of a text string using Google's ML Kit.
- google_mlkit_document_scannerSame familyFlutter plugin to use Google's ML Kit document scanner API to digitize physical documents.
- google_mlkit_smart_replySame familyFlutter plugin for Google's ML Kit Smart Reply API
- google_mlkit_text_recognitionBuilt on google_mlkit_commonsFlutter plugin to use Google's ML Kit Text Recognition on Android and iOS.
- google_mlkit_barcode_scanningBuilt on google_mlkit_commonsA Flutter plugin to use Google's ML Kit Barcode Scanning on Android and iOS.
- google_mlkit_face_detectionBuilt on google_mlkit_commonsFlutter plugin to use Google's ML Kit Face Detection on iOS and Android.
- google_mlkit_translationBuilt on google_mlkit_commonsFlutter plugin for Google's ML Kit On-Device Translation.
- google_mlkit_selfie_segmentationBuilt on google_mlkit_commonsFlutter plugin to use Google's ML Kit Selfie Segmentation API.