initScanbotSdk static method

Future initScanbotSdk(
  1. ScanbotSdkConfig config
)

Initializes the Scanbot SDK with given configs. The Scanbot SDK must be initialized before using any other API methods.

Implementation

static Future initScanbotSdk(ScanbotSdkConfig config) async {
  try {
    LicenseRegistry.addLicense(licenses);
    var arguments = {};
    addParam(config.licenseKey, 'licenseKey', arguments);
    addParam(config.loggingEnabled, 'loggingEnabled', arguments);
    addParam(config.storageBaseDirectory, 'storageBaseDirectory', arguments);
    await _channel.invokeMethod('initScanbotSdk', arguments);
  } catch (e) {
    print(e);
    rethrow;
  }
}