Demonstrates how to use the mobile_scanner plugin.
git clone https://github.com/juliansteenbakker/mobile_scanner.git
cd mobile_scanner/example/lib
flutter pub get
flutter run
Scanner widget with control buttons overlay. Shows first detected barcode. (See ListView example for detecting and displaying multiple barcodes at the same time.)
- Displays Flashlight, SwitchCamera and Start/Stop buttons.
- Uses
MobileScannerController
to start/stop, toggle flashlight, switch camera. - Displays Gallery button to use images as source for analysis.
- Handles changes in AppLifecycleState.
Scanner widget with control buttons overlay. Shows all barcodes detected at the same time in a ListView.
- Displays Flashlight, SwitchCamera and Start/Stop buttons.
- Uses
MobileScannerController
to start/stop, toggle flashlight, switch camera. - Displays Gallery button to use images as source for analysis.
Scanner widget with control buttons and zoom slider overlay. Shows first detected barcode.
- Displays Flashlight, SwitchCamera and Start/Stop buttons and zoom slider.
- Uses
MobileScannerController
to start/stop, toggle flashlight, switch camera, set zoom scale. - Displays Gallery button to use images as source for analysis.
Scanner widget with control buttons overlay. Shows the first detected barcode and the captured image.
- Displays Flashlight, SwitchCamera and Start/Stop buttons.
- Uses
MobileScannerController
to start/stop, toggle flashlight, switch camera. - Displays captured image that contains the detected barcode.
Scanner widget in one of many pages that can be swiped horizontally. Starts and stops scanner depending on page visibility.
- Shows first detected barcode.
Scanner widget with scan window overlay. Barcodes are only detected inside the scan window.
- Draws scan window - a half-transparent overlay with a cut out middle part.
- Draws bounding box around (first) detected barcode. (not working on every device)
Scanner widget with scan window overlay. Barcodes are only detected inside the scan window.
- Draws scan window - a half-transparent overlay with a cut out middle part that has a border with rounded corners.
- Displays Flashlight, SwitchCamera buttons.
- Uses
MobileScannerController
to toggle flashlight, switch camera.