RafaelBarbosatec / qr_code_dart_scan

A QR code scanner that works on both iOS and Android using dart decoder.
MIT License
15 stars 20 forks source link

How can I change TypeCamera programmatically? #20

Closed scognito closed 1 week ago

scognito commented 4 months ago

I see that I can change the Scan Type (live / take picture), but not the camera type (front / back) programmatically. Is it inteded?

Cool package btw, thanks!

RafaelBarbosatec commented 4 months ago

Hi @scognito ! Thanks for bring this case. At the moment it is not possible, but I will take a look a way to implements this feature.

RafaelBarbosatec commented 4 months ago

Available in latest release. Just pass the controller and call changeCamera method

scognito commented 4 months ago

Cool works!

I just get this error while changing camera, but it works!

The following CameraException was thrown building ValueListenableBuilder(state: _ValueListenableBuilderState#d4bda): CameraException(Disposed CameraController, buildPreview() was called on a disposed CameraController.)

yfming93 commented 4 weeks ago

Cool works!

I just get this error while changing camera, but it works!

The following CameraException was thrown building ValueListenableBuilder(state: _ValueListenableBuilderState#d4bda): CameraException(Disposed CameraController, buildPreview() was called on a disposed CameraController.)

had The same issue.

rafaelalmeidacloudwalk commented 3 weeks ago

hi @yfming93 ! Which version do you use? IT was fixed in latest version.