Android Hardware Barcode Scanner
A Flutter plugin for Android hardware barcode scanner devices (PDA / rugged devices).
It listens to native scan events and streams scanned barcode values into Flutter.
This plugin is intended for built-in hardware scanners, not camera-based scanning.
Features
- Android hardware barcode scanner support
- Event-based scanning using Dart Streams
- Fast and lightweight
- No camera dependency
- Simple and clean Flutter API
Supported Devices
This plugin works on Android devices with native barcode scanning hardware, such as:
- Industrial PDAs
- Rugged handheld terminals
- OEM devices that broadcast barcode scan intents
Camera-based barcode scanning is not supported.
Platform Support
| Platform | Supported |
|---|---|
| Android | โ Yes |
| iOS | โ No |
| Web | โ No |
Installation
Add the plugin to your pubspec.yaml:
dependencies:
artemis_hardware_barcode_scanner: ^1.0.0
Example
class BarcodePage extends StatefulWidget {
const BarcodePage({super.key});
@override
State<BarcodePage> createState() => _BarcodePageState();
}
class _BarcodePageState extends State<BarcodePage> {
String? _barcode;
@override
void initState() {
super.initState();
ArtemisHardwareBarcodeScannerPlugin.onBarcodeScanned.listen((barcode) {
setState(() {
_barcode = barcode;
});
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Barcode Scanner')),
body: Center(
child: Text(_barcode ?? 'Scan a barcode'),
),
);
}
}
๐ Permissions
None required! This plugin works without runtime permission prompts.
๐ License
MIT
๐ก Contributions
Pull requests, bug reports, and feedback are welcome!
๐ฃ Author
Developed by ABOMIS ยท โ๏ธ mike.backshaw@abomis.com