setLicense method
Sets the license key for the barcode reader.
The license parameter should be a valid license string obtained from Dynamsoft.
Returns 0 on success, -1 on failure.
Implementation
Future<int> setLicense(String license) async {
try {
await handleThenable(LicenseManager.initLicense(license, true));
await handleThenable(CoreModule.loadWasm(['dbr']));
} catch (e) {
print(e);
return -1;
}
return 0;
}