.scanBarcode displays this error
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):
Present in the 0.3.0 version on Android, iOS works fine.
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
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