juliansteenbakker / mobile_scanner

A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
BSD 3-Clause "New" or "Revised" License
874 stars 508 forks source link

Flash not working in release build #718

Open Fanom2813 opened 1 year ago

Fanom2813 commented 1 year ago

Hello ! While in debug mode i can qrController.toggleTorch() and it works as expected. , but in release. version it fails with

E/flutter (18172): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method torch on channel dev.steenbakker.mobile_scanner/scanner/method) E/flutter (18172): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308) E/flutter (18172): <asynchronous suspension> E/flutter (18172): #1 MobileScannerController.toggleTorch (package:mobile_scanner/src/mobile_scanner_controller.dart:280) E/flutter (18172): <asynchronous suspension>

navaronbracke commented 1 year ago

This works as expected on version 3.5.1. The torch toggles properly in release mode.