let MacOS return a list of barcodes to align with iOS/Android
Showing
1 changed file
with
9 additions
and
1 deletions
| @@ -138,7 +138,15 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, | @@ -138,7 +138,15 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, | ||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | DispatchQueue.main.async { | 140 | DispatchQueue.main.async { |
| 141 | - self?.sink?(["name": "barcode", "data" : ["payload": barcode.payloadStringValue, "symbology": barcode.symbology.toInt as Any?]] as [String : Any]) | 141 | + self?.sink?([ |
| 142 | + "name": "barcode", | ||
| 143 | + "data": [ | ||
| 144 | + [ | ||
| 145 | + "payload": barcode.payloadStringValue ?? "", | ||
| 146 | + "symbology": barcode.symbology.toInt ?? -1, | ||
| 147 | + ], | ||
| 148 | + ], | ||
| 149 | + ]) | ||
| 142 | } | 150 | } |
| 143 | // if barcodeType == "QR" { | 151 | // if barcodeType == "QR" { |
| 144 | // let image = CIImage(image: source) | 152 | // let image = CIImage(image: source) |
-
Please register or login to post a comment