Enguerrand ARMINJON
Committed by GitHub

Update MobileScannerPlugin.swift

print(500 / 1000) -> 0
print(Double(500 / 1000)) -> 0.0
print(500 / Double(1000)) -> 0.5
@@ -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 = Double(timeoutMs / 1000) 106 + self.mobileScanner.timeoutSeconds = 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