Skip to content

Commit f01cb68

Browse files
committed
fix: Add PDF417 format support documentation and example
- Added comprehensive documentation for all supported barcode formats - Updated example to demonstrate PDF417 format configuration - Enhanced README with format configuration examples - Updated version to 7.0.1 - Fixes issue #139: PDF417 barcode format support
1 parent 537cc40 commit f01cb68

File tree

7 files changed

+129
-66
lines changed

7 files changed

+129
-66
lines changed

.flutter-plugins-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker_ios","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12/","native_build":true,"dependencies":[]},{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-6.0.1/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.22/","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+13/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-6.0.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"file_selector_macos","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+1/","native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/","native_build":false,"dependencies":["file_selector_macos"]},{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-6.0.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"file_selector_linux","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.2+1/","native_build":true,"dependencies":[]},{"name":"image_picker_linux","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/","native_build":false,"dependencies":["file_selector_linux"]}],"windows":[{"name":"file_selector_windows","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+2/","native_build":true,"dependencies":[]},{"name":"image_picker_windows","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/","native_build":false,"dependencies":["file_selector_windows"]}],"web":[{"name":"image_picker_for_web","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.5/","dependencies":[]},{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-6.0.1/","dependencies":[]}]},"dependencyGraph":[{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"mobile_scanner","dependencies":[]}],"date_created":"2024-10-11 14:01:48.222361","version":"3.24.3","swift_package_manager_enabled":false}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker_ios","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-7.0.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.28/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"image_picker_android","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+23/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-7.0.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"file_selector_macos","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"image_picker_macos","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+2/","native_build":false,"dependencies":["file_selector_macos"],"dev_dependency":false},{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-7.0.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"file_selector_linux","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3+2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"image_picker_linux","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+2/","native_build":false,"dependencies":["file_selector_linux"],"dev_dependency":false}],"windows":[{"name":"file_selector_windows","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"image_picker_windows","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/","native_build":false,"dependencies":["file_selector_windows"],"dev_dependency":false}],"web":[{"name":"image_picker_for_web","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/","dependencies":[],"dev_dependency":false},{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-7.0.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"mobile_scanner","dependencies":[]}],"date_created":"2025-07-06 14:07:45.052206","version":"3.32.5","swift_package_manager_enabled":{"ios":false,"macos":false}}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 7.0.1
2+
3+
**Improvements:**
4+
- Added comprehensive documentation for supported barcode formats including PDF417
5+
- Updated example to demonstrate PDF417 format configuration
6+
- Enhanced README with format configuration examples
7+
18
## 6.0.1
29

310
**BREAKING CHANGES BY [MOBILE_SCANNER](https://pub.dev/packages/mobile_scanner):**

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<td>Screenshot</td>
1212
</tr>
1313
<tr>
14-
<td><img src="https://raw.githubusercontent.com/mohesu/barcode_scanner/master/assets/final.gif" width=250 height=480 alt=""></td>
15-
<td><img src="https://raw.githubusercontent.com/mohesu/barcode_scanner/master/assets/final.PNG" width=250 height=480 alt=""></td>
14+
<td><img src="https://raw.githubusercontent.com/itsarvinddev/barcode_scanner/master/assets/final.gif" width=250 height=480 alt=""></td>
15+
<td><img src="https://raw.githubusercontent.com/itsarvinddev/barcode_scanner/master/assets/final.PNG" width=250 height=480 alt=""></td>
1616
</tr>
1717
</table>
1818

@@ -102,6 +102,38 @@ If you don't provide a controller, you can't control functions like the torch(fl
102102

103103
If you don't set `detectionSpeed: DetectionSpeed.noDuplicates`, you can get multiple scans in a very short time.
104104

105+
## Supported Barcode Formats
106+
107+
This package supports all barcode formats available in the `mobile_scanner` package:
108+
109+
- **QR Code** (`BarcodeFormat.qrCode`)
110+
- **Code 128** (`BarcodeFormat.code128`)
111+
- **Code 39** (`BarcodeFormat.code39`)
112+
- **Code 93** (`BarcodeFormat.code93`)
113+
- **Codabar** (`BarcodeFormat.codabar`)
114+
- **Data Matrix** (`BarcodeFormat.dataMatrix`)
115+
- **EAN-13** (`BarcodeFormat.ean13`)
116+
- **EAN-8** (`BarcodeFormat.ean8`)
117+
- **ITF** (`BarcodeFormat.itf`)
118+
- **UPC-A** (`BarcodeFormat.upcA`)
119+
- **UPC-E** (`BarcodeFormat.upcE`)
120+
- **PDF417** (`BarcodeFormat.pdf417`) - 2D barcode format
121+
- **AZTEC** (`BarcodeFormat.aztec`)
122+
123+
To configure specific formats, use the `formats` parameter in `MobileScannerController`:
124+
125+
```dart
126+
controller: MobileScannerController(
127+
detectionSpeed: DetectionSpeed.noDuplicates,
128+
formats: [
129+
BarcodeFormat.qrCode,
130+
BarcodeFormat.code128,
131+
BarcodeFormat.pdf417, // PDF417 support
132+
BarcodeFormat.dataMatrix,
133+
],
134+
),
135+
```
136+
105137
```dart
106138
import 'package:ai_barcode_scanner/ai_barcode_scanner.dart';
107139

example/lib/main.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ class _HomePageState extends State<HomePage> {
5151
hideGalleryButton: false,
5252
controller: MobileScannerController(
5353
detectionSpeed: DetectionSpeed.noDuplicates,
54+
formats: [
55+
BarcodeFormat.qrCode,
56+
BarcodeFormat.code128,
57+
BarcodeFormat.code39,
58+
BarcodeFormat.ean13,
59+
BarcodeFormat.ean8,
60+
BarcodeFormat.upcA,
61+
BarcodeFormat.upcE,
62+
BarcodeFormat.pdf417,
63+
BarcodeFormat.dataMatrix,
64+
BarcodeFormat.aztec,
65+
],
5466
),
5567
onDetect: (BarcodeCapture capture) {
5668
/// The row string scanned barcode value

example/pubspec.lock

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,47 @@ packages:
77
path: ".."
88
relative: true
99
source: path
10-
version: "5.2.2"
10+
version: "7.0.1"
1111
async:
1212
dependency: transitive
1313
description:
1414
name: async
15-
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
15+
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
1616
url: "https://pub.dev"
1717
source: hosted
18-
version: "2.11.0"
18+
version: "2.13.0"
1919
boolean_selector:
2020
dependency: transitive
2121
description:
2222
name: boolean_selector
23-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
23+
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
2424
url: "https://pub.dev"
2525
source: hosted
26-
version: "2.1.1"
26+
version: "2.1.2"
2727
characters:
2828
dependency: transitive
2929
description:
3030
name: characters
31-
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
31+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
3232
url: "https://pub.dev"
3333
source: hosted
34-
version: "1.3.0"
34+
version: "1.4.0"
3535
clock:
3636
dependency: transitive
3737
description:
3838
name: clock
39-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
39+
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
4040
url: "https://pub.dev"
4141
source: hosted
42-
version: "1.1.1"
42+
version: "1.1.2"
4343
collection:
4444
dependency: transitive
4545
description:
4646
name: collection
47-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
47+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
4848
url: "https://pub.dev"
4949
source: hosted
50-
version: "1.18.0"
50+
version: "1.19.1"
5151
cross_file:
5252
dependency: transitive
5353
description:
@@ -68,10 +68,10 @@ packages:
6868
dependency: transitive
6969
description:
7070
name: fake_async
71-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
71+
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
7272
url: "https://pub.dev"
7373
source: hosted
74-
version: "1.3.1"
74+
version: "1.3.3"
7575
file_selector_linux:
7676
dependency: transitive
7777
description:
@@ -219,18 +219,18 @@ packages:
219219
dependency: transitive
220220
description:
221221
name: leak_tracker
222-
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
222+
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
223223
url: "https://pub.dev"
224224
source: hosted
225-
version: "10.0.5"
225+
version: "10.0.9"
226226
leak_tracker_flutter_testing:
227227
dependency: transitive
228228
description:
229229
name: leak_tracker_flutter_testing
230-
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
230+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
231231
url: "https://pub.dev"
232232
source: hosted
233-
version: "3.0.5"
233+
version: "3.0.9"
234234
leak_tracker_testing:
235235
dependency: transitive
236236
description:
@@ -251,10 +251,10 @@ packages:
251251
dependency: transitive
252252
description:
253253
name: matcher
254-
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
254+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
255255
url: "https://pub.dev"
256256
source: hosted
257-
version: "0.12.16+1"
257+
version: "0.12.17"
258258
material_color_utilities:
259259
dependency: transitive
260260
description:
@@ -267,10 +267,10 @@ packages:
267267
dependency: transitive
268268
description:
269269
name: meta
270-
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
270+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
271271
url: "https://pub.dev"
272272
source: hosted
273-
version: "1.15.0"
273+
version: "1.16.0"
274274
mime:
275275
dependency: transitive
276276
description:
@@ -283,18 +283,18 @@ packages:
283283
dependency: transitive
284284
description:
285285
name: mobile_scanner
286-
sha256: d234581c090526676fd8fab4ada92f35c6746e3fb4f05a399665d75a399fb760
286+
sha256: "54005bdea7052d792d35b4fef0f84ec5ddc3a844b250ecd48dc192fb9b4ebc95"
287287
url: "https://pub.dev"
288288
source: hosted
289-
version: "5.2.3"
289+
version: "7.0.1"
290290
path:
291291
dependency: transitive
292292
description:
293293
name: path
294-
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
294+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
295295
url: "https://pub.dev"
296296
source: hosted
297-
version: "1.9.0"
297+
version: "1.9.1"
298298
plugin_platform_interface:
299299
dependency: transitive
300300
description:
@@ -307,55 +307,55 @@ packages:
307307
dependency: transitive
308308
description: flutter
309309
source: sdk
310-
version: "0.0.99"
310+
version: "0.0.0"
311311
source_span:
312312
dependency: transitive
313313
description:
314314
name: source_span
315-
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
315+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
316316
url: "https://pub.dev"
317317
source: hosted
318-
version: "1.10.0"
318+
version: "1.10.1"
319319
stack_trace:
320320
dependency: transitive
321321
description:
322322
name: stack_trace
323-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
323+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
324324
url: "https://pub.dev"
325325
source: hosted
326-
version: "1.11.1"
326+
version: "1.12.1"
327327
stream_channel:
328328
dependency: transitive
329329
description:
330330
name: stream_channel
331-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
331+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
332332
url: "https://pub.dev"
333333
source: hosted
334-
version: "2.1.2"
334+
version: "2.1.4"
335335
string_scanner:
336336
dependency: transitive
337337
description:
338338
name: string_scanner
339-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
339+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
340340
url: "https://pub.dev"
341341
source: hosted
342-
version: "1.2.0"
342+
version: "1.4.1"
343343
term_glyph:
344344
dependency: transitive
345345
description:
346346
name: term_glyph
347-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
347+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
348348
url: "https://pub.dev"
349349
source: hosted
350-
version: "1.2.1"
350+
version: "1.2.2"
351351
test_api:
352352
dependency: transitive
353353
description:
354354
name: test_api
355-
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
355+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
356356
url: "https://pub.dev"
357357
source: hosted
358-
version: "0.7.2"
358+
version: "0.7.4"
359359
typed_data:
360360
dependency: transitive
361361
description:
@@ -376,10 +376,10 @@ packages:
376376
dependency: transitive
377377
description:
378378
name: vm_service
379-
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
379+
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
380380
url: "https://pub.dev"
381381
source: hosted
382-
version: "14.2.5"
382+
version: "15.0.0"
383383
web:
384384
dependency: transitive
385385
description:
@@ -389,5 +389,5 @@ packages:
389389
source: hosted
390390
version: "1.1.0"
391391
sdks:
392-
dart: ">=3.5.0 <4.0.0"
393-
flutter: ">=3.24.0"
392+
dart: ">=3.7.0 <4.0.0"
393+
flutter: ">=3.29.0"

0 commit comments

Comments
 (0)