Flutter
Setup
The flutter based Vision SDK is an on-device computer vision and NLP based toolkit designed to scan barcodes, QR codes, and extract structured information from logistics documents such as shipping labels, bills of lading (BOLs), and inventory/item labels. Built for real-time performance, it enables fast, offline processing without relying on cloud services. The SDK also supports advanced use cases including item retrieval, price tag extraction, and item counting, making it ideal for warehouse, retail, and logistics applications. With a focus on accuracy, speed, and device-level intelligence, the Vision SDK empowers developers to build seamless and efficient vision-based workflows directly on mobile and embedded devices.
Development Requirements
iOS
- iOS 13.0+
- Swift: 5.4.2+
- Xcode Version: 13.0+
Android
- Android: 10+
- Java: 17+
- Kotlin: 1.9.0+
- Android Gradle Plugin Version: 8.1.0+
Installation
pubspec.yaml
Add the following dependency in your pubspec.yaml
file:
fluttervisionsdkplugin: ^1.3.1
Usage
Since VisionSDK uses camera, your app needs to have camera permission in order for VisionSDK to work.
iOS
Add Privacy - Camera Usage Description
to Info.plist file
Android
Add the following permission in your app's AndroidManifest.xml
file:
<uses-permission android:name="android.permission.CAMERA" />
Initialization
In order to setup VisionSDK in your project, you need to initialized it before accessing it.
Open Camera
After initialization, you can use VisionCameraWidget
to open camera and get its feed previewed on screen. Be sure that you have granted the camera permission before you can use VisionCameraWidget
.
Check out the code below to understand how VisionCameraWidget
works, how to send data to and from it using communicators.
Note that we have two communicators here:
FlutterToPluginCommunicator
: You receive this communicator whenVisionCameraWidget
is created. This communicator can be used to send data to VisionSDK plugin.PluginToFlutterCommunicator
: You create an object of this communicator and override its methods to receive data from VisionSDK plugin.
FlutterToPluginCommunicator
Here is the list of all publicly available functions that you can call from FlutterToPluginCommunicator
:
- setMultipleScanEnabled
- setScanAuto
- setScanManual
- setCaptureModeBarcode
- setCaptureModeQrCode
- setCaptureModeOCR
- setFocusSettings
- setObjectDetectionSettings
- setCameraSettings
- startCamera
- stopCamera
- capturePhoto
- rescan
- callShippingLabelApi
- callBolApi
- callItemLabelApi
PluginToFlutterCommunicator
Here is the list of all callbacks, in which VisionSDK responds:
- onCameraStarted
- onCameraStopped
- onScanError
- onCodesReceived
- onDetectionResult
- onImageCaptured
- onOnlineSLResult
- onOnlineBOLResult
- onOnlineItemLabelResult
- onOnlineDocumentClassificationResult
More details on how these communicators work is on next pages.