Julian Steenbakker

release of v1.0.0

## 1.0.0
BREAKING CHANGES:
This version adds a new allowDuplicates option which now defaults to FALSE. this means that it will only call onDetect once after a scan.
If you still want duplicates, you can set allowDuplicates to true.
This also means that you don't have to check for duplicates yourself anymore.
New features:
* We now have web support! Keep in mind that only QR codes are supported right now.
Bugfixes:
* Fixed hot reload not working.
* Fixed Navigator.of(context).pop() not working in the example app due to duplicate MaterialApp declaration.
* Fixed iOS MLKit version not resolving the latest version.
* Updated all dependencies
## 0.2.0
You can provide a path to controller.analyzeImage(path) in order to scan a local photo from the gallery!
Check out the example app to see how you can use the image_picker plugin to retrieve a photo from
... ...
... ... @@ -10,7 +10,7 @@ A universal barcode and QR code scanner for Flutter based on MLKit. Uses CameraX
| Android | iOS | MacOS | Web | Linux | Windows |
| :-----: | :-: | :---: | :-: | :---: | :-----: |
| ✔️ | ✔️ | ✔️ | | | |
| ✔️ | ✔️ | ✔️ | ✔️ | | |
### Android
SDK 21 and newer. Reason: CameraX requires at least SDK 21.
... ... @@ -29,6 +29,10 @@ NSPhotoLibraryUsageDescription - describe why your app needs permission for the
### macOS
macOS 10.13 or newer. Reason: Apple Vision library.
### Web
Web only supports QR codes for now.
Do you have experience with Flutter Web development? [Help me with migrating from jsQR to qr-scanner for full barcode support!](https://github.com/juliansteenbakker/mobile_scanner/issues/54)
## Features Supported
| Features | Android | iOS | macOS | Web |
... ... @@ -41,6 +45,8 @@ Import `package:mobile_scanner/mobile_scanner.dart`, and use the widget with or
If you don't provide a controller, you can't control functions like the torch(flash) or switching camera.
If you don't set allowDuplicates to false, you can get multiple scans in a very short time, causing things like pop() to fire lots of times.
Example without controller:
```dart
... ... @@ -51,6 +57,7 @@ import 'package:mobile_scanner/mobile_scanner.dart';
return Scaffold(
appBar: AppBar(title: const Text('Mobile Scanner')),
body: MobileScanner(
allowDuplicates: false,
onDetect: (barcode, args) {
final String code = barcode.rawValue;
debugPrint('Barcode found! $code');
... ... @@ -69,6 +76,7 @@ import 'package:mobile_scanner/mobile_scanner.dart';
return Scaffold(
appBar: AppBar(title: const Text('Mobile Scanner')),
body: MobileScanner(
allowDuplicates: false,
controller: MobileScannerController(
facing: CameraFacing.front, torchEnabled: true),
onDetect: (barcode, args) {
... ... @@ -127,6 +135,7 @@ import 'package:mobile_scanner/mobile_scanner.dart';
],
),
body: MobileScanner(
allowDuplicates: false,
controller: cameraController,
onDetect: (barcode, args) {
final String code = barcode.rawValue;
... ...
name: mobile_scanner
description: A universal barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision & AVFoundation on macOS.
version: 0.2.0
version: 1.0.0
repository: https://github.com/juliansteenbakker/mobile_scanner
environment:
... ...