Julian Steenbakker

Merge branch 'master' into master-play-services

# Conflicts:
#	CHANGELOG.md
#	pubspec.yaml
  1 +## 1.1.2
  2 +This version is the last version that will run on Flutter 2.x
  3 +
  4 +Bugfixes:
  5 +* Changed onDetect to be mandatory.
  6 +
1 ## 1.1.1-play-services 7 ## 1.1.1-play-services
2 This version uses the MLKit play-services model on Android in order to save space. 8 This version uses the MLKit play-services model on Android in order to save space.
3 With the example app, this version reduces the release version from 14.9MB to 7MB. 9 With the example app, this version reduces the release version from 14.9MB to 7MB.
@@ -9,7 +9,7 @@ buildscript { @@ -9,7 +9,7 @@ buildscript {
9 } 9 }
10 10
11 dependencies { 11 dependencies {
12 - classpath 'com.android.tools.build:gradle:7.2.0' 12 + classpath 'com.android.tools.build:gradle:7.2.1'
13 } 13 }
14 } 14 }
15 15
@@ -24,7 +24,7 @@ apply plugin: 'com.android.library' @@ -24,7 +24,7 @@ apply plugin: 'com.android.library'
24 apply plugin: 'kotlin-android' 24 apply plugin: 'kotlin-android'
25 25
26 android { 26 android {
27 - compileSdkVersion 31 27 + compileSdkVersion 32
28 28
29 compileOptions { 29 compileOptions {
30 sourceCompatibility JavaVersion.VERSION_1_8 30 sourceCompatibility JavaVersion.VERSION_1_8
@@ -6,7 +6,7 @@ buildscript { @@ -6,7 +6,7 @@ buildscript {
6 } 6 }
7 7
8 dependencies { 8 dependencies {
9 - classpath 'com.android.tools.build:gradle:7.2.0' 9 + classpath 'com.android.tools.build:gradle:7.2.1'
10 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 10 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 } 11 }
12 } 12 }
1 -#Tue Feb 15 22:11:04 CET 2022 1 +#Tue May 31 10:34:01 CEST 2022
2 distributionBase=GRADLE_USER_HOME 2 distributionBase=GRADLE_USER_HOME
3 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 3 +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
4 distributionPath=wrapper/dists 4 distributionPath=wrapper/dists
5 zipStorePath=wrapper/dists 5 zipStorePath=wrapper/dists
6 zipStoreBase=GRADLE_USER_HOME 6 zipStoreBase=GRADLE_USER_HOME
@@ -355,7 +355,7 @@ @@ -355,7 +355,7 @@
355 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 355 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
356 CLANG_ENABLE_MODULES = YES; 356 CLANG_ENABLE_MODULES = YES;
357 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 357 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
358 - DEVELOPMENT_TEAM = 3K8Q7WKS3W; 358 + DEVELOPMENT_TEAM = 75Y2P2WSQQ;
359 ENABLE_BITCODE = NO; 359 ENABLE_BITCODE = NO;
360 INFOPLIST_FILE = Runner/Info.plist; 360 INFOPLIST_FILE = Runner/Info.plist;
361 LD_RUNPATH_SEARCH_PATHS = ( 361 LD_RUNPATH_SEARCH_PATHS = (
@@ -484,7 +484,7 @@ @@ -484,7 +484,7 @@
484 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 484 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
485 CLANG_ENABLE_MODULES = YES; 485 CLANG_ENABLE_MODULES = YES;
486 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 486 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
487 - DEVELOPMENT_TEAM = 3K8Q7WKS3W; 487 + DEVELOPMENT_TEAM = 75Y2P2WSQQ;
488 ENABLE_BITCODE = NO; 488 ENABLE_BITCODE = NO;
489 INFOPLIST_FILE = Runner/Info.plist; 489 INFOPLIST_FILE = Runner/Info.plist;
490 LD_RUNPATH_SEARCH_PATHS = ( 490 LD_RUNPATH_SEARCH_PATHS = (
@@ -507,7 +507,7 @@ @@ -507,7 +507,7 @@
507 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 507 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
508 CLANG_ENABLE_MODULES = YES; 508 CLANG_ENABLE_MODULES = YES;
509 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 509 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
510 - DEVELOPMENT_TEAM = 3K8Q7WKS3W; 510 + DEVELOPMENT_TEAM = 75Y2P2WSQQ;
511 ENABLE_BITCODE = NO; 511 ENABLE_BITCODE = NO;
512 INFOPLIST_FILE = Runner/Info.plist; 512 INFOPLIST_FILE = Runner/Info.plist;
513 LD_RUNPATH_SEARCH_PATHS = ( 513 LD_RUNPATH_SEARCH_PATHS = (
@@ -47,5 +47,7 @@ @@ -47,5 +47,7 @@
47 </array> 47 </array>
48 <key>UIViewControllerBasedStatusBarAppearance</key> 48 <key>UIViewControllerBasedStatusBarAppearance</key>
49 <false/> 49 <false/>
  50 + <key>CADisableMinimumFrameDurationOnPhone</key>
  51 + <true/>
50 </dict> 52 </dict>
51 </plist> 53 </plist>
@@ -13,7 +13,7 @@ class MobileScanner extends StatefulWidget { @@ -13,7 +13,7 @@ class MobileScanner extends StatefulWidget {
13 /// 13 ///
14 /// [barcode] The barcode object with all information about the scanned code. 14 /// [barcode] The barcode object with all information about the scanned code.
15 /// [args] Information about the state of the MobileScanner widget 15 /// [args] Information about the state of the MobileScanner widget
16 - final Function(Barcode barcode, MobileScannerArguments? args)? onDetect; 16 + final Function(Barcode barcode, MobileScannerArguments? args) onDetect;
17 17
18 /// TODO: Function that gets called when the Widget is initialized. Can be usefull 18 /// TODO: Function that gets called when the Widget is initialized. Can be usefull
19 /// to check wether the device has a torch(flash) or not. 19 /// to check wether the device has a torch(flash) or not.
@@ -30,7 +30,7 @@ class MobileScanner extends StatefulWidget { @@ -30,7 +30,7 @@ class MobileScanner extends StatefulWidget {
30 /// Create a [MobileScanner] with a [controller], the [controller] must has been initialized. 30 /// Create a [MobileScanner] with a [controller], the [controller] must has been initialized.
31 const MobileScanner({ 31 const MobileScanner({
32 Key? key, 32 Key? key,
33 - this.onDetect, 33 + required this.onDetect,
34 this.controller, 34 this.controller,
35 this.fit = BoxFit.cover, 35 this.fit = BoxFit.cover,
36 this.allowDuplicates = false, 36 this.allowDuplicates = false,
@@ -47,7 +47,7 @@ class _MobileScannerState extends State<MobileScanner> @@ -47,7 +47,7 @@ class _MobileScannerState extends State<MobileScanner>
47 @override 47 @override
48 void initState() { 48 void initState() {
49 super.initState(); 49 super.initState();
50 - WidgetsBinding.instance.addObserver(this); 50 + WidgetsBinding.instance?.addObserver(this);
51 controller = widget.controller ?? MobileScannerController(); 51 controller = widget.controller ?? MobileScannerController();
52 } 52 }
53 53
@@ -82,10 +82,10 @@ class _MobileScannerState extends State<MobileScanner> @@ -82,10 +82,10 @@ class _MobileScannerState extends State<MobileScanner>
82 if (!widget.allowDuplicates) { 82 if (!widget.allowDuplicates) {
83 if (lastScanned != barcode.rawValue) { 83 if (lastScanned != barcode.rawValue) {
84 lastScanned = barcode.rawValue; 84 lastScanned = barcode.rawValue;
85 - widget.onDetect!(barcode, value! as MobileScannerArguments); 85 + widget.onDetect(barcode, value! as MobileScannerArguments);
86 } 86 }
87 } else { 87 } else {
88 - widget.onDetect!(barcode, value! as MobileScannerArguments); 88 + widget.onDetect(barcode, value! as MobileScannerArguments);
89 } 89 }
90 }); 90 });
91 return ClipRect( 91 return ClipRect(
@@ -131,7 +131,7 @@ class _MobileScannerState extends State<MobileScanner> @@ -131,7 +131,7 @@ class _MobileScannerState extends State<MobileScanner>
131 @override 131 @override
132 void dispose() { 132 void dispose() {
133 controller.dispose(); 133 controller.dispose();
134 - WidgetsBinding.instance.removeObserver(this); 134 + WidgetsBinding.instance?.removeObserver(this);
135 super.dispose(); 135 super.dispose();
136 } 136 }
137 } 137 }
1 name: mobile_scanner 1 name: mobile_scanner
2 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. 2 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.
3 -version: 1.1.1-play-services 3 +version: 1.1.2
4 repository: https://github.com/juliansteenbakker/mobile_scanner 4 repository: https://github.com/juliansteenbakker/mobile_scanner
5 5
6 environment: 6 environment: