startMrzScanner static method
Starts the Ready-to-Use MRZ Document Recognizer as a full-screen modal UI dialog. The MRZ Document Recognizer provides guided, automatic document scanning.
Implementation
static Future<MrzScanningResult> startMrzScanner(
MrzScannerConfiguration config) async {
try {
var updatedParameters = config.toJson();
const defaultJsonName = "MrzScreen";
var configuration = await SharedCalls.applyParametersOnDefaultJson(
defaultJsonName, updatedParameters);
var result =
await SharedCalls.invoke(_channel, 'startMrzScanner', configuration);
if (SharedCalls.wasCanceled(result)) {
return MrzScanningResult.canceled();
}
return MrzScanningResult.fromJson(jsonDecode(result));
} catch (e) {
Logger.root.severe(e);
return MrzScanningResult.error(e.toString());
}
}