Reputation: 1
I want to have QR scan capability in flutter app along with other camera functionalities. I can't find any package that provides this functionality with the option to use your own camera controller. Instead there are QR scanning packages which implement their own controllers with their UIs. I don't want to use multiple camera controllers (one my own and another of the package). I only want to provide a specific area of the screen ( like a box ), with the cameraPreview() of my camera controller underneath it, where the package can 'SEE' and then return the QR code value. Can anyone help? If I knew how to make a flutter plugin I would but sadly I don't have any android or IOS programming knowledge.
Upvotes: 0
Views: 320
Reputation: 3552
https://pub.dev/packages/qr_code_scanner should work for you.
I created a similar screen with a square inside a modalBottomsheet to scan QR Codes.
For this i wrapped the QRView inside a Container with the device height * 0.5 (50%)
Container(
height: MediaQuery.of(context).size.height * 0.5,
child: QRView(
overlay: QrScannerOverlayShape(
borderColor: Colors.white,
),
key: qrKey,
onQRViewCreated: _onQRViewCreated,
),
),
You can set the width and height as you wish inside the Container.
The controller of this package lets you:
Upvotes: 0