Showing
1 changed file
with
4 additions
and
1 deletions
| @@ -42,7 +42,10 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin { | @@ -42,7 +42,10 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin { | ||
| 42 | init(barcodeHandler: BarcodeHandler, registry: FlutterTextureRegistry) { | 42 | init(barcodeHandler: BarcodeHandler, registry: FlutterTextureRegistry) { |
| 43 | self.mobileScanner = MobileScanner(registry: registry, mobileScannerCallback: { barcodes, error, image in | 43 | self.mobileScanner = MobileScanner(registry: registry, mobileScannerCallback: { barcodes, error, image in |
| 44 | if error != nil { | 44 | if error != nil { |
| 45 | - barcodeHandler.publishEvent(["name": "error", "data": error!.localizedDescription]) | 45 | + barcodeHandler.publishEvent([ |
| 46 | + "name": MobileScannerErrorCodes.BARCODE_ERROR, | ||
| 47 | + "data": error!.localizedDescription, | ||
| 48 | + ]) | ||
| 46 | return | 49 | return |
| 47 | } | 50 | } |
| 48 | 51 |
-
Please register or login to post a comment