Julian Steenbakker

bug: fix detect being null

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,
@@ -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(