I found out what line is causing my error.
It's await _qrCodeScanner.processImage(InputImage.fromFile(file));
When code is reaching this point app is crashing.
I need permission to access temporary directory or something?
I am using https://pub.dev/packages/google_ml_kit and https://pub.dev/packages/path_provider to get this functions.
_qrCodeScanner = GoogleMlKit.vision
.barcodeScanner(<BarcodeFormat>[BarcodeFormat.qrCode]);
getTemporaryDirectory().then((value) {
_tempDir = value;
});
File file = await File('${_tempDir.path}/image.png').create();
file.writeAsBytesSync(frame.asUint8List());
await _qrCodeScanner.processImage(InputImage.fromFile(file));
But I don't found any of GoogleMLKit line in my crash report.