simple_barcode_scanner icon indicating copy to clipboard operation
simple_barcode_scanner copied to clipboard

.scanBarcode displays this error

Open collinpowell opened this issue 11 months ago • 1 comments

E/flutter (21551): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method scanBarcode on channel flutter_barcode_scanner) E/flutter (21551): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:368:7) E/flutter (21551): E/flutter (21551): #1 FlutterBarcodeScanner.scanBarcode (package:simple_barcode_scanner/flutter_barcode_scanner.dart:57:9) E/flutter (21551): E/flutter (21551): #2 BarcodeScanner._scanBarcodeForMobileAndTabDevices (package:simple_barcode_scanner/screens/io_device.dart:90:22) E/flutter (21551):

collinpowell avatar Feb 26 '25 16:02 collinpowell

Present in the 0.3.0 version on Android, iOS works fine.

gal0wsky avatar Mar 15 '25 10:03 gal0wsky

In version 0.3.0, the plugin uses references to FlutterActivity, that's why app throws an error if your MainActivity extends FlutterFragmentActivity.

It looks like this issue has been fixed (see https://github.com/CodingWithTashi/simple_barcode_scanner/pull/116), but a new version of the plugin has not been published yet.

I ended up using latest commit (for now) in my pubspec.yaml file like this:

simple_barcode_scanner:
  git: 
    url: [email protected]:CodingWithTashi/simple_barcode_scanner
    ref: dedd497cc11aef9be73425741daeb9af80fb19c1

AlexanderSimakov avatar Oct 24 '25 08:10 AlexanderSimakov

Haven't got much time look at these issues lately, @AlexanderSimakov Thanks for confirming. check latest version here https://pub.dev/packages/simple_barcode_scanner

CodingWithTashi avatar Oct 24 '25 20:10 CodingWithTashi