Closed sgehrman closed 4 years ago
same problem on flutter_torch MissingPluginException (MissingPluginException(No implementation found for method turnOff on channel flutter_torch))
Yes that's normal (and it's not a bug from this library) You can only have one connection to the camera (the preview has already one).
can I turn on the torch using CameraPreview?
I'm trying to turn the flash on when I show a CameraPreview. If I turn on the flash before showing the preview, the flash immediately turns off when the preview comes up. And when I try and turn off the light after dismissing the preview, I get:
MissingPluginException (MissingPluginException(No implementation found for method turnOff on channel g123k/torch_compat))
Which is strange since if I put the call in a delay, it works without that exception.
So, opening a cameraPreview messes with your plugin somehow and it won't work until the cameraPreview is torn down completely.