startCheckScanner static method
Starts the Check Scanner UI as full-screen modal UI dialog. Extracts the check number, routing number, and account number as key-value pairs from the MICR code
Implementation
static Future<CheckScanResult> startCheckScanner(
CheckScannerConfiguration config) async {
try {
var updatedParameters = config.toJson();
const defaultJsonName = "CheckScreen";
var configuration = await SharedCalls.applyParametersOnDefaultJson(
defaultJsonName, updatedParameters);
var result = await SharedCalls.invoke(
_channel, 'startCheckScanner', configuration);
if (SharedCalls.wasCanceled(result)) {
return CheckScanResult.canceled();
}
return CheckScanResult.fromJson(jsonDecode(result));
} catch (e) {
Logger.root.severe(e);
return CheckScanResult.error(e.toString());
}
}