initialize method

Future<bool> initialize({
  1. required ByteData license,
  2. required String webServiceUrl,
})

Implementation

Future<bool> initialize({
  required ByteData license,
  required String webServiceUrl,
}) async {
  // Create InitConfig with the provided license
  var config = InitConfig(license);

  try {
    backendInitialize(webServiceUrl);
    var (success, error) = await DocumentReader.instance.initialize(config);

    if (success) {
      debugPrint("initialization is $success");
      return true;
    } else {
      debugPrint("error is ${error?.message.toString()}");
      return false;
    }
  } catch (_) {
    return false;
  }
}