Navaron Bracke

fix double values for MacOS

... ... @@ -52,8 +52,8 @@ class MobileScannerHandler(
"data" to barcodes,
"image" to mapOf(
"bytes" to image,
"width" to width!!.toDouble(),
"height" to height!!.toDouble(),
"width" to width?.toDouble(),
"height" to height?.toDouble(),
)
))
} else {
... ...
... ... @@ -165,8 +165,8 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler,
"data": barcodes.map({ $0.toMap() }),
"image": cgImage == nil ? nil : [
"bytes": FlutterStandardTypedData(bytes: cgImage!.jpegData(compressionQuality: 0.8)!),
"width": cgImage!.width,
"height": cgImage!.height,
"width": Double(cgImage!.width),
"height": Double(cgImage!.height),
],
])
}
... ...