README
A flutter implementation of the Famoco scanner device.
Requirements
- Minimum version is for Android 10 (API 28).
Compatible devices
Those mentioned in the SDK.
Compatible with :
- FX 325 (
FX325,1) - FX 335 (
FX335,1)
Tested on :
- FX 335 (
FX335,1)
Usage
-
Make your
MainActivityinheritFamocoScanPhysicalButtonHandlerActivity. If you found a better way to handle the physical button, you can ignore this step.Ignoring this step also means
FamocoScanner.instance.scanPhysicalButtonwill not be called. -
Simply use
FamocoScanner.instance. e.g.FamocoScanner.instance.startScan();To intercept a barcode, you'll only need to use
decodedCompleteon aStatefulWidget:@override void initState() { super.initState(); _onDecodedSubscription = FamocoScanner.instance.decodedComplete.listen( (data) { setState(() { _lastBarcodeScanned = data.barcode; }); }); } @override void dispose() { super.dispose(); _onDecodedSubscription.cancel(); }The method
FamocoScanner.instance.enableScanner();is automatically called on subsribing todecodedComplete, same thing when callingcancelon the subscription,disableScanneris called.
ℹ️ The instance of the implementation is automatically chosen based on the device's brand.
Example
See the example app.
This is a replica of the app found in the SDK documentation : Demo app (v1.3, source code).
Used by
Made and used by Aleda
.