juliuscanute / qr_code_scanner

QR Code Scanner for Flutter
BSD 2-Clause "Simplified" License
999 stars 759 forks source link

Writing tests for this plugin #642

Open literalEval opened 1 year ago

literalEval commented 1 year ago

I am using this plugin in my app and it works great. But, I wanted to write tests for my app and got stuck at a part. The thing is that onQRViewCreated in the QRView class is called when the native view is created and otherwise throws an error. So, no view is created in test environment and I can not test the method tied with onQRViewCreated callback.

How to proceed with this ?