flutter_barcode_scanner: CRASH java.lang.NullPointerException: Attempt to invoke interface method 'void
java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.EventChannel$EventSink.success(java.lang.Object)' on a null object reference
E/AndroidRuntime(32669): at com.amolg.flutterbarcodescanner.FlutterBarcodeScannerPlugin$1.run(FlutterBarcodeScannerPlugin.java:201)
E/AndroidRuntime(32669): at android.os.Handler.handleCallback(Handler.java:883)
E/AndroidRuntime(32669): at android.os.Handler.dispatchMessage(Handler.java:100)
E/AndroidRuntime(32669): at android.os.Looper.loop(Looper.java:237)
E/AndroidRuntime(32669): at android.app.ActivityThread.main(ActivityThread.java:7857)
E/AndroidRuntime(32669): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32669): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(32669): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
I/Process (32669): Sending signal. PID: 32669 SIG: 9
Lost connection to device.
what i try to do is stream barcodes and get only qrcode not standart ean carcodes.
String res = await FlutterBarcodeScanner.getBarcodeStreamReceiver(
"#ff6666", "Cancel", true, ScanMode.QR)
.firstWhere((code) {
print("singleWhere $code");
if (code.toString().startsWith("http")) {
print("founded");
return true;
}
return false;
});
using latest version 1.0
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 16 (3 by maintainers)
i got this issue too