Skip to content

Commit

Permalink
Update mobile_scanner version to 6.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rvndsngwn committed Oct 11, 2024
1 parent f7c9f18 commit ac823b6
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ image_picker_ios=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_ios
image_picker_linux=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/
image_picker_macos=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/
image_picker_windows=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/
mobile_scanner=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-5.2.3/
mobile_scanner=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-6.0.1/
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -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}
{"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}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 6.0.0

- Dependency updates
- mobile_scanner: ^6.0.1
- setPortraitOrientation bool added. Now you can set the orientation.

- dependency updates

## 5.2.2

- dependency updates
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
</tr>
</table>

## Platform Support

| Android | iOS | macOS | Web | Linux | Windows |
| ------- | --- | ----- | --- | ----- | ------- |
||||| :x: | :x: |

## Features Supported

See the example app for detailed implementation information.
Expand All @@ -27,12 +33,6 @@ See the example app for detailed implementation information.
| scanWindow | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| barcodeOverlay | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |

## Platform Support

| Android | iOS | macOS | Web | Linux | Windows |
| ------- | --- | ----- | --- | ----- | ------- |
||||| :x: | :x: |

## Platform specific setup

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

## Web

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

### Providing a mirror for the barcode scanning library

Expand Down
17 changes: 11 additions & 6 deletions lib/src/ai_barcode_scanner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ class AiBarcodeScanner extends StatefulWidget {
/// Camera switch and torch toggle buttons are added by default
/// You can add more actions to the app bar using this parameter
final List<Widget>? actions;

final bool setPortraitOrientation;
const AiBarcodeScanner({
super.key,
this.fit = BoxFit.cover,
Expand Down Expand Up @@ -236,6 +238,7 @@ class AiBarcodeScanner extends StatefulWidget {
this.hideGalleryIcon = true,
this.bottomSheetBuilder,
this.extendBodyBehindAppBar = true,
this.setPortraitOrientation = true,
});

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

@override
void dispose() {
controller.dispose();
widget.controller?.dispose();
// controller.dispose();
// widget.controller?.dispose();
widget.onDispose?.call();
super.dispose();
}

@override
Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
if (widget.setPortraitOrientation) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
}
return Scaffold(
appBar: widget.appBarBuilder?.call(context, controller) ??
AppBar(
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ai_barcode_scanner
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.
version: 5.2.2
version: 6.0.0
homepage: https://mohesu.com
repository: https://github.com/mohesu/barcode_scanner.git
issue_tracker: https://github.com/mohesu/barcode_scanner/issues
Expand All @@ -23,7 +23,7 @@ dependencies:
flutter:
sdk: flutter

mobile_scanner: ^5.2.3
mobile_scanner: ^6.0.1
image_picker: ^1.1.2

dev_dependencies:
Expand Down

0 comments on commit ac823b6

Please sign in to comment.