flutter_barcode_scanner
2.0.0, released 6 years ago by an unverified publisher
Provides barcode and QR code scanning on Android and iOS via native camera APIs.
What it does
The plugin opens a camera view, scans barcodes or QR codes, and returns the result as a string. It supports one‑time scans and continuous streaming of results.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need quick barcode/QR scanning without writing native code
- You want a simple API that works on both Android and iOS
Skip it when
- You require advanced image processing or custom detection models
- You need cross‑platform support for web or desktop
Strengths
- Easy to integrate with a single method call
- Supports continuous scanning via a stream
- Handles iOS Swift setup and permission configuration
Weaknesses
- Limited to Android and iOS only
- No built‑in support for custom detection logic
- Relies on native UI, so UI customization is minimal
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
iOS requires Swift support, deployment target >=12, Swift version 5, and adding NSCameraUsageDescription to Info.plist; Android works out‑of‑the‑box but ensure flutter_plugin_android_lifecycle is present.
import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart';
Future<void> scan() async {
String result = await FlutterBarcodeScanner.scanBarcode('#ff6666', 'Cancel', true, ScanMode.DEFAULT);
print('Scanned: $result');
}Alternatives
Packages that do the same job and could replace flutter_barcode_scanner.
- mobile_scanner
Offers similar scanning features with additional support for custom overlay UI and better performance on newer devices
95Compare - google_mlkit_barcode_scanning
Provides on‑device ML‑Kit barcode detection with more format support and no need for native UI
94Compare - barcode
Pure Dart implementation, works on all platforms including web
66Compare
Works with
Packages commonly used together with flutter_barcode_scanner: ones it builds on, ones built on it, and its own family.