Closed DavideBicego closed 4 years ago
Actually neither TorchCompat.turnOn or tornOff works in Android
I think that the problem is that I'm trying to toggle the flash with the camera open...
Anyway flutter clean has no effect, you example app works and the device is a Huawei/Honor JSN-L21.
Indeed, this project can not work if you have another camera session opened. Android doesn't allow to have multiple instances at the same type.
I close the issue, since it's not related to the plugin itself. Please open a new one, if necessary :)
code:
bool hasFlash = await TorchCompat.hasTorch;
error:
E/flutter (17404): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method turnOn on channel g123k/torch_compat)
flutter doctor:
I didn't test it on iOS yet