initialize static method

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

Implementation

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

  // If webServiceUrl is needed, it might be set here or on the instance.
  // For standard offline usage, it's not typically required.
  // if (webServiceUrl != null) {
  //   DocumentReader.instance.serviceUrl = webServiceUrl; // Hypothetical
  // }

  try {
    var (success, error) = await DocumentReader.instance.initialize(config);
    if (success) {
      return true;
    } else {
      return false;
    }
  } catch (_) {
    return false;
  }
}