mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 464 forks source link

[Bug] #293

Open BernardinD opened 3 years ago

BernardinD commented 3 years ago

BUG REPORTS WITHOUT PROVIDING THESE INFORMATIONS WILL BE CLOSED DIRECTLY. DON'T REMOVE THE SECTIONS!

Describe the bug A clear and concise description of what the bug is.

I'm not able to use this library on my Windows desktop app. I followed the instructions for Windows in the README but am still getting this error:

flutter: Another exception was thrown: MissingPluginException(No implementation found for method listen on channel de.mintware.barcode_scan/events) [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method requestCameraPermission on channel de.mintware.barcode_scan)

I get this or a similar error whenever using the BarcodeScanner.

To Reproduce Steps to reproduce the behavior:

  1. Copy and paste example code into flutter project
  2. Run flutter run -d windows
  3. See error
  4. Click the scan button in the top right
  5. See error

Expected behavior A clear and concise description of what you expected to happen. I'm expecting the normal expected operation of the example code.

Screenshots If applicable, add screenshots to help explain your problem.

Logs If applicable, add the verbose output of flutter run.

[+8655 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method numberOfCameras on
channel de.mintware.barcode_scan)
[   +2 ms] #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:7)
[   +2 ms] <asynchronous suspension>
[   +1 ms] #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
[   +1 ms] #2      BarcodeScanner.numberOfCameras (package:barcode_scan/platform_wrapper.dart:90:21)
[   +1 ms] #3      ScanPageState.initState.<anonymous closure> (package:membershipapp/pages/scanpage.dart:95:47)
[   +5 ms] #4      new Future.delayed.<anonymous closure> (dart:async/future.dart:326:39)
[   +1 ms] #5      _rootRun (dart:async/zone.dart:1182:47)
[   +1 ms] #6      _CustomZone.run (dart:async/zone.dart:1093:19)
[   +1 ms] #7      _CustomZone.runGuarded (dart:async/zone.dart:997:7)
[   +1 ms] #8      _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
[   +1 ms] #9      _rootRun (dart:async/zone.dart:1190:13)
[  +12 ms] #10     _CustomZone.run (dart:async/zone.dart:1093:19)
[   +3 ms] #11     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1021:23)
[   +3 ms] #12     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
[   +3 ms] #13     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:397:19)
[  +20 ms] #14     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:428:5)
[   +1 ms] #15     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
[+57249 ms] flutter: Another exception was thrown: MissingPluginException(No implementation found for method listen on channel
de.mintware.barcode_scan/events)
[   +4 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method requestCameraPermission
on channel de.mintware.barcode_scan)
[   +2 ms] #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:7)
[   +2 ms] <asynchronous suspension>
[   +2 ms] #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
[   +8 ms] #2      BarcodeScanner.scan (package:barcode_scan/platform_wrapper.dart:56:24)
[   +3 ms] #3      ScanPageState.scan (package:membershipapp/pages/scanpage.dart:315:41)
[   +9 ms] #4      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:993:19)
[   +3 ms] #5      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1111:38)
[  +13 ms] #6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:183:24)
[   +3 ms] #7      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:598:11)
[   +2 ms] #8      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:287:5)
[  +24 ms] #9      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:259:7)
[   +3 ms] #10     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:157:27)
[   +3 ms] #11     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:374:20)
[  +11 ms] #12     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:350:22)
[  +20 ms] #13     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:266:11)
[   +3 ms] #14     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:305:7)
[  +17 ms] #15     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:240:7)
[   +2 ms] #16     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:213:7)
[   +4 ms] #17     _rootRunUnary (dart:async/zone.dart:1206:13)
[   +8 ms] #18     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[  +16 ms] #19     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
[   +2 ms] #20     _invoke1 (dart:ui/hooks.dart:265:10)
[  +14 ms] #21     _dispatchPointerDataPacket (dart:ui/hooks.dart:174:5)

Environment (please complete the following information):

Additional context Add any other context about the problem here.