Skip to content

Commit

Permalink
release of v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
juliansteenbakker committed Mar 11, 2022
1 parent 754478e commit 691093f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 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
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 |
Expand All @@ -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
Expand All @@ -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');
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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:
Expand Down

0 comments on commit 691093f

Please sign in to comment.