captureTheImage method
void
captureTheImage()
Implementation
void captureTheImage() async {
await _stopStreaming();
XFile? file = await takePicture();
if(file != null) {
File imageFile = File(file.path);
/// process the image for face detection
InputImage inputImage = InputImage.fromFilePath(file.path);
MRZResult? mrzResult = await _processImage(inputImage);
if (kDebugMode) {
print("Mrz Info captured: $mrzResult");
}
if(mrzResult != null) {
widget.onImage(mrzResult, imageFile);
} else {
startStreaming();
}
}
}