Skip to content

Commit ac823b6

Browse files
committed
Update mobile_scanner version to 6.0.1
1 parent f7c9f18 commit ac823b6

6 files changed

+31
-18
lines changed

.flutter-plugins

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ image_picker_ios=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_ios
1010
image_picker_linux=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/
1111
image_picker_macos=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/
1212
image_picker_windows=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/
13-
mobile_scanner=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-5.2.3/
13+
mobile_scanner=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-6.0.1/

.flutter-plugins-dependencies

+1-1
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-5.2.3/","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-5.2.3/","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-5.2.3/","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-5.2.3/","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-09-29 17:08:11.819519","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/","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 13:43:10.336516","version":"3.24.3","swift_package_manager_enabled":false}

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 6.0.0
2+
3+
- Dependency updates
4+
- mobile_scanner: ^6.0.1
5+
- setPortraitOrientation bool added. Now you can set the orientation.
6+
7+
- dependency updates
8+
19
## 5.2.2
210

311
- dependency updates

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
</tr>
1717
</table>
1818

19+
## Platform Support
20+
21+
| Android | iOS | macOS | Web | Linux | Windows |
22+
| ------- | --- | ----- | --- | ----- | ------- |
23+
||||| :x: | :x: |
24+
1925
## Features Supported
2026

2127
See the example app for detailed implementation information.
@@ -27,12 +33,6 @@ See the example app for detailed implementation information.
2733
| scanWindow | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
2834
| barcodeOverlay | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
2935

30-
## Platform Support
31-
32-
| Android | iOS | macOS | Web | Linux | Windows |
33-
| ------- | --- | ----- | --- | ----- | ------- |
34-
||||| :x: | :x: |
35-
3636
## Platform specific setup
3737

3838
### Android
@@ -75,8 +75,8 @@ Ensure that you granted camera permission in XCode -> Signing & Capabilities:
7575

7676
## Web
7777

78-
As of version 5.0.0 adding the library to the `index.html` is no longer required,
79-
as the library is automatically loaded on first use.
78+
As of version 5.0.0 adding the barcode scanning library script to the `index.html` is no longer required,
79+
as the script is automatically loaded on first use.
8080

8181
### Providing a mirror for the barcode scanning library
8282

lib/src/ai_barcode_scanner.dart

+11-6
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ class AiBarcodeScanner extends StatefulWidget {
198198
/// Camera switch and torch toggle buttons are added by default
199199
/// You can add more actions to the app bar using this parameter
200200
final List<Widget>? actions;
201+
202+
final bool setPortraitOrientation;
201203
const AiBarcodeScanner({
202204
super.key,
203205
this.fit = BoxFit.cover,
@@ -236,6 +238,7 @@ class AiBarcodeScanner extends StatefulWidget {
236238
this.hideGalleryIcon = true,
237239
this.bottomSheetBuilder,
238240
this.extendBodyBehindAppBar = true,
241+
this.setPortraitOrientation = true,
239242
});
240243

241244
@override
@@ -260,18 +263,20 @@ class _AiBarcodeScannerState extends State<AiBarcodeScanner> {
260263

261264
@override
262265
void dispose() {
263-
controller.dispose();
264-
widget.controller?.dispose();
266+
// controller.dispose();
267+
// widget.controller?.dispose();
265268
widget.onDispose?.call();
266269
super.dispose();
267270
}
268271

269272
@override
270273
Widget build(BuildContext context) {
271-
SystemChrome.setPreferredOrientations([
272-
DeviceOrientation.portraitUp,
273-
DeviceOrientation.portraitDown,
274-
]);
274+
if (widget.setPortraitOrientation) {
275+
SystemChrome.setPreferredOrientations([
276+
DeviceOrientation.portraitUp,
277+
DeviceOrientation.portraitDown,
278+
]);
279+
}
275280
return Scaffold(
276281
appBar: widget.appBarBuilder?.call(context, controller) ??
277282
AppBar(

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ai_barcode_scanner
22
description: A universal AI barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision & AVFoundation on macOS.
3-
version: 5.2.2
3+
version: 6.0.0
44
homepage: https://mohesu.com
55
repository: https://github.com/mohesu/barcode_scanner.git
66
issue_tracker: https://github.com/mohesu/barcode_scanner/issues
@@ -23,7 +23,7 @@ dependencies:
2323
flutter:
2424
sdk: flutter
2525

26-
mobile_scanner: ^5.2.3
26+
mobile_scanner: ^6.0.1
2727
image_picker: ^1.1.2
2828

2929
dev_dependencies:

0 commit comments

Comments
 (0)