Flutter Scan QR code without show the camera

Viewed 1060

I'm working on a Flutter project that scans QR code but I don't need to render the camera image on the screen.

I've tried to use these packages:

https://pub.dev/packages/qrscan, https://pub.dev/packages/qr_code_scanner

but none of them scans the QR code without render the camera image at the screen.

Is there any other way I could do this on background?

1 Answers

You could use the qr_code_scanner plugin and wrap it into an Opacity Widget:

Opacity(
    opacity: 0,
    child: 
      QRView(),
),

However, make sure to carefully consider the end-user experience before implementing such feature.

Related