zxing-dart icon indicating copy to clipboard operation
zxing-dart copied to clipboard

Example App is broken

Open sarbagyastha opened this issue 4 years ago • 7 comments

The current example app seems not to be working.

sarbagyastha avatar May 21 '21 00:05 sarbagyastha

I believe you have to call "initialize()" before getting the image stream.

jtmcdole avatar Jun 22 '21 02:06 jtmcdole

Keep broken for me

E/flutter ( 6392): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: RangeError (index): Index out of range: index should be less than 460852: 460852
E/flutter ( 6392): #0      _Int32ArrayView.[] (dart:typed_data-patch/typed_data_patch.dart:4260:7)
E/flutter ( 6392): #1      new RGBLuminanceSource (package:zxing2/src/rgb_luminance_source.dart:28:25)
E/flutter ( 6392): #2      decode (package:zxing2_example/decode.dart:7:28)
E/flutter ( 6392): #3      _CameraAppState.initState.<anonymous closure>.<anonymous closure> (package:zxing2_example/main.dart:37:23)
E/flutter ( 6392): #4      CameraController.startImageStream.<anonymous closure> (package:camera/src/camera_controller.dart:395:20)
E/flutter ( 6392): #5      _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter ( 6392): #6      _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter ( 6392): #7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter ( 6392): #8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter ( 6392): #9      _DelayedData.perform (dart:async/stream_impl.dart:591:14)
E/flutter ( 6392): #10     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
E/flutter ( 6392): #11     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7)
E/flutter ( 6392): #12     _rootRun (dart:async/zone.dart:1346:47)
E/flutter ( 6392): #13     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter ( 6392): #14     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter ( 6392): #15     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter ( 6392): #16     _rootRun (dart:async/zone.dart:1354:13)
E/flutter ( 6392): #17     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter ( 6392): #18     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter ( 6392): #19     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter ( 6392): #20     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter ( 6392): #21     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

RafaelBarbosatec avatar Aug 11 '21 19:08 RafaelBarbosatec

I'm using the dart image package to get my luminance and I've had it work great.

jtmcdole avatar Aug 12 '21 02:08 jtmcdole

in brach xha/fix_example only remove this comments: image

I'm trying use this package with the camera.

RafaelBarbosatec avatar Aug 12 '21 12:08 RafaelBarbosatec

Converted fromCameraImage to Image and it worked. But its only work with ResolutionPreset.high.

In this way, there is a lot of lag on the phone. This decode is probably too expensive. Is there any way I can do this process using isolate or something? Do you have any recommendations?

RafaelBarbosatec avatar Aug 12 '21 14:08 RafaelBarbosatec

I got it. serialized ImageCamera to work with isolate. and it was beautiful!

RafaelBarbosatec avatar Aug 12 '21 15:08 RafaelBarbosatec

https://pub.dev/packages/zxing2/example do not using ZXing at all!! Nice to look it as an example ))

Nashev avatar Oct 04 '21 21:10 Nashev