Skip to content

Commit

Permalink
Update MobileScannerPlugin.swift
Browse files Browse the repository at this point in the history
print(500 / 1000) -> 0
print(Double(500 / 1000)) -> 0.0
print(500 / Double(1000)) -> 0.5
  • Loading branch information
EArminjon authored Nov 21, 2023
1 parent d3cc99c commit f43b4b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Classes/MobileScannerPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
let returnImage: Bool = (call.arguments as! Dictionary<String, Any?>)["returnImage"] as? Bool ?? false
let speed: Int = (call.arguments as! Dictionary<String, Any?>)["speed"] as? Int ?? 0
let timeoutMs: Int = (call.arguments as! Dictionary<String, Any?>)["timeout"] as? Int ?? 0
self.mobileScanner.timeoutSeconds = Double(timeoutMs / 1000)
self.mobileScanner.timeoutSeconds = timeoutMs / Double(1000)

let formatList = formats.map { format in return BarcodeFormat(rawValue: format)}
var barcodeOptions: BarcodeScannerOptions? = nil
Expand Down

0 comments on commit f43b4b9

Please sign in to comment.