processFrame method
Should called each frame, returns rectangle of recognized doc if any.
Implementation
Future<Rectangle?> processFrame(CameraImage image, int rotation) async {
//some checks to ignore problems with flutter camera plugin
if (!image.isEmpty() && _scanner != nullptr) {
return compute(
_processFrameAsync, _FrameData(_scanner.address, image, rotation));
} else {
return null;
}
}