Question: I'm using QRView but the camera doesn't open until I tap/click the container. I want the camera to open while the page is rendered. How can i fix that?

Here is my code:

```
              Container(
            height: ScreenSize.getScreenWidth(context) / 1.6,
            width: ScreenSize.getScreenWidth(context) / 1.6,
            color: Colors.pink,
            child: QRView(
              key: qrKey,
              onQRViewCreated: _onQRViewCreated,

            ),
          ),

```

Here is \_onQRViewCreated function:

```
  void _onQRViewCreated(QRViewController controller) {
     this.controller = controller;
     controller.scannedDataStream.listen((scanData) {
     setState(() {
      result = scanData;
     });
   });
  }

```

Answer: 
I found it just add this line

`controller.resumeCamera();`

Function is:

```
  void _onQRViewCreated(QRViewController controller) {
     this.controller = controller;
     controller.resumeCamera();
     controller.scannedDataStream.listen((scanData) {
     setState(() {
      result = scanData;
     });
   });
  }

```
If you are using qr\_code\_scanner while using Flutter 3, it may not work well on android. It happened to me too. Finally I used mobile\_scanner instead of qr\_code\_scanner.