init method

  1. @override
Future<int?> init(
  1. String key
)
override

Initializes the OCR SDK using the provided key.

Returns 0 on success, or a non-zero error code if initialization fails.

Implementation

@override
Future<int?> init(String key) async {
  if (Platform.isLinux || Platform.isWindows) {
    await download();
  }
  return await methodChannel.invokeMethod<int>('init', {'key': key});
}