Merge branch 'krille/fix-qr-code' into 'main'

chore: Follow up fix qr code scanner

See merge request famedly/fluffychat!895
This commit is contained in:
Krille Fear 2022-05-30 07:44:33 +00:00
commit f89a70ea9d

View File

@ -59,6 +59,12 @@ class _QrScannerModalState extends State<QrScannerModal> {
void _onQRViewCreated(QRViewController controller) {
this.controller = controller;
// Workaround for QR Scanner is started in Pause mode
// https://github.com/juliuscanute/qr_code_scanner/issues/538#issuecomment-1133883828
if (Platform.isAndroid) {
controller.pauseCamera();
}
controller.resumeCamera();
late StreamSubscription sub;
sub = controller.scannedDataStream.listen((scanData) {
sub.cancel();