You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.3.0/","native_build":true,"dependencies":[]}],"android":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.3.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.3.0/","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"mobile_scanner","dependencies":[]}],"date_created":"2023-07-03 13:36:32.059509","version":"3.10.5"}
1
+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.4.1/","native_build":true,"dependencies":[]}],"android":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.4.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.4.1/","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.4.1/","dependencies":[]}]},"dependencyGraph":[{"name":"mobile_scanner","dependencies":[]}],"date_created":"2023-10-02 23:08:02.151393","version":"3.13.6"}
_This plugin is based on the [mobile_scanner](https://pub.dev/packages/mobile_scanner) plugin by [steenbakker.dev](https://pub.dev/publishers/steenbakker.dev/packages)._
9
-
10
-
_Huge thanks to [Julian Steenbakker](https://github.com/sponsors/juliansteenbakker)_ 🙏
11
-
12
-
An universal barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision & AVFoundation on macOS.
13
-
14
-
### What's deferent from [mobile_scanner](https://pub.dev/packages/mobile_scanner)?
15
-
16
-
_The only difference is that this plugin provides a ready to use UI widget with customizable options._
17
-
18
-
### Preview of the widget
6
+
### Screenshots
19
7
20
8
<table>
21
9
<tr>
@@ -28,45 +16,61 @@ _The only difference is that this plugin provides a ready to use UI widget with
28
16
</tr>
29
17
</table>
30
18
19
+
20
+
## Features Supported
21
+
22
+
See the example app for detailed implementation information.
This packages uses the **bundled version** of MLKit Barcode-scanning for Android. This version is more accurate and immediately available to devices. However, this version will increase the size of the app with approximately 3 to 10 MB. The alternative for this is to use the **unbundled version** of MLKit Barcode-scanning for Android. This version is older than the bundled version however this only increases the size by around 600KB.
42
42
To use this version you must alter the mobile_scanner gradle file to replace `com.google.mlkit:barcode-scanning:17.0.2` with `com.google.android.gms:play-services-mlkit-barcode-scanning:18.0.0`. Keep in mind that if you alter the gradle files directly in your project it can be overriden when you update your pubspec.yaml. I am still searching for a way to properly replace the module in gradle but have yet to find one.
43
43
44
44
[You can read more about the difference between the two versions here.](https://developers.google.com/ml-kit/vision/barcode-scanning/android)
45
45
46
46
### iOS
47
-
48
47
**Add the following keys to your Info.plist file, located in <projectroot>/ios/Runner/Info.plist:**
49
48
NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor.
50
49
51
50
**If you want to use the local gallery feature from [image_picker](https://pub.dev/packages/image_picker)**
52
51
NSPhotoLibraryUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.
53
52
54
53
Example,
54
+
```
55
+
<key>NSCameraUsageDescription</key>
56
+
<string>This app needs camera access to scan QR codes</string>
57
+
58
+
<key>NSPhotoLibraryUsageDescription</key>
59
+
<string>This app needs photos access to get QR code from photo library</string>
60
+
```
55
61
56
-
```
57
-
<key>NSCameraUsageDescription</key>
58
-
<string>This app needs camera access to scan QR codes</string>
59
-
60
-
<key>NSPhotoLibraryUsageDescription</key>
61
-
<string>This app needs photos access to get QR code from photo library</string>
62
-
```
63
62
64
63
### macOS
65
-
66
64
Ensure that you granted camera permission in XCode -> Signing & Capabilities:
67
65
68
66
<imgwidth="696"alt="Screenshot of XCode where Camera is checked"src="https://user-images.githubusercontent.com/24459435/193464115-d76f81d0-6355-4cb2-8bee-538e413a3ad0.png">
69
67
68
+
## Web
69
+
This package uses ZXing on web to read barcodes so it needs to be included in `index.html` as script.
0 commit comments