Navaron Bracke
Committed by GitHub

Merge pull request #877 from navaronbracke/fix_double_conversion_crash

fix: Fix conversion crash in iOS
1 -## 3.5.3 1 +## 3.5.4
2 Bugs fixed: 2 Bugs fixed:
3 * Fixed a bug with an implicit conversion to integer for the scan timeout for iOS. (thanks @EArminjon !) 3 * Fixed a bug with an implicit conversion to integer for the scan timeout for iOS. (thanks @EArminjon !)
4 4
@@ -103,7 +103,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin { @@ -103,7 +103,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
103 let returnImage: Bool = (call.arguments as! Dictionary<String, Any?>)["returnImage"] as? Bool ?? false 103 let returnImage: Bool = (call.arguments as! Dictionary<String, Any?>)["returnImage"] as? Bool ?? false
104 let speed: Int = (call.arguments as! Dictionary<String, Any?>)["speed"] as? Int ?? 0 104 let speed: Int = (call.arguments as! Dictionary<String, Any?>)["speed"] as? Int ?? 0
105 let timeoutMs: Int = (call.arguments as! Dictionary<String, Any?>)["timeout"] as? Int ?? 0 105 let timeoutMs: Int = (call.arguments as! Dictionary<String, Any?>)["timeout"] as? Int ?? 0
106 - self.mobileScanner.timeoutSeconds = timeoutMs / Double(1000) 106 + self.mobileScanner.timeoutSeconds = Double(timeoutMs) / Double(1000)
107 107
108 let formatList = formats.map { format in return BarcodeFormat(rawValue: format)} 108 let formatList = formats.map { format in return BarcodeFormat(rawValue: format)}
109 var barcodeOptions: BarcodeScannerOptions? = nil 109 var barcodeOptions: BarcodeScannerOptions? = nil
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 # 4 #
5 Pod::Spec.new do |s| 5 Pod::Spec.new do |s|
6 s.name = 'mobile_scanner' 6 s.name = 'mobile_scanner'
7 - s.version = '3.5.3' 7 + s.version = '3.5.4'
8 s.summary = 'An universal scanner for Flutter based on MLKit.' 8 s.summary = 'An universal scanner for Flutter based on MLKit.'
9 s.description = <<-DESC 9 s.description = <<-DESC
10 An universal scanner for Flutter based on MLKit. 10 An universal scanner for Flutter based on MLKit.
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 # 4 #
5 Pod::Spec.new do |s| 5 Pod::Spec.new do |s|
6 s.name = 'mobile_scanner' 6 s.name = 'mobile_scanner'
7 - s.version = '3.5.3' 7 + s.version = '3.5.4'
8 s.summary = 'An universal scanner for Flutter based on MLKit.' 8 s.summary = 'An universal scanner for Flutter based on MLKit.'
9 s.description = <<-DESC 9 s.description = <<-DESC
10 An universal scanner for Flutter based on MLKit. 10 An universal scanner for Flutter based on MLKit.
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: 3.5.3 3 +version: 3.5.4
4 repository: https://github.com/juliansteenbakker/mobile_scanner 4 repository: https://github.com/juliansteenbakker/mobile_scanner
5 5
6 environment: 6 environment: