initScanbotSdk static method

Future<void> 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<void> initScanbotSdk(ScanbotSdkConfig config) async {
  LicenseRegistry.addLicense(licenses);
  try {
    _sdkLicenseListener = config.licenseErrorHandler;
    _channel.setMethodCallHandler(_handler);
    var json = config.toJson();
    await _channel.invokeMethod('initScanbotSdk', json);
  } catch (e) {
    Logger.root.severe(e);
    rethrow;
  }
}