google_mlkit_barcode_scanning
1.0.3, released 8 days ago by flutter-ml.dev
A Flutter plugin to use Google's ML Kit Barcode Scanning on Android and iOS.
What it does
A Flutter plugin that leverages Google's ML Kit Barcode Scanning native APIs to read data encoded using most standard barcode formats from an input image. It processes images asynchronously via platform channels to keep the user interface responsive.
AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to scan standard barcode formats or QR codes using Google's ML Kit on mobile.
- You want on-device barcode recognition without sending data to external servers.
Skip it when
- You need web or desktop platform support.
- You want a package maintained directly by Google.
Strengths
- Supports a wide range of standard barcode formats and types.
- Executes native on-device processing via Google's ML Kit.
Weaknesses
- Only supports mobile platforms (iOS and Android).
- Requires specific platform configurations (e.g., minimum iOS deployment target 15.0 and Android SDK configuration).
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Requires setting minimum iOS deployment target to 15.0, adding specific linker flags (-ObjC, -all_load) in Xcode for Swift Package Manager, and configuring Android compile and min SDK requirements.
final List<BarcodeFormat> formats = [BarcodeFormat.all];
final barcodeScanner = BarcodeScanner(formats: formats);
final List<Barcode> barcodes = await barcodeScanner.processImage(inputImage);
barcodeScanner.close();Alternatives
Packages that do the same job and could replace google_mlkit_barcode_scanning.
- mobile_scanner
If you want a dedicated camera-view widget for continuous barcode scanning instead of processing custom input images.
95Compare - qr_flutter
If your only goal is generating QR codes rather than scanning them.
50Compare
Works with
Packages commonly used together with google_mlkit_barcode_scanning: ones it builds on, ones built on it, and its own family.
- google_mlkit_commonsgoogle_mlkit_barcode_scanning depends on itCommon classes and utility methods for Google's ML Kit plugins
- google_mlkit_text_recognitionSame familyFlutter plugin to use Google's ML Kit Text Recognition on Android and iOS.
- google_mlkit_face_detectionSame familyFlutter plugin to use Google's ML Kit Face Detection on iOS and Android.
- google_mlkit_translationSame familyFlutter plugin for Google's ML Kit On-Device Translation.
- google_mlkit_selfie_segmentationSame familyFlutter plugin to use Google's ML Kit Selfie Segmentation API.
- google_mlkit_language_idSame familyDetermine the language of a text string using Google's ML Kit.
- google_mlkit_pose_detectionSame familyFlutter plugin for Google ML Kit Pose Detection on Android and iOS.
- google_mlkit_document_scannerSame familyFlutter plugin to use Google's ML Kit document scanner API to digitize physical documents.