findDownloadedModel method

Future<ModelInfo?> findDownloadedModel(
  1. OCRModule module
)

Returns info for a specific downloaded model. Returns null if model is not downloaded.

Implementation

Future<ModelInfo?> findDownloadedModel(OCRModule module) async {
  final result = await _channel.invokeMethod<Map<dynamic, dynamic>>('findDownloadedModel', {
    'modelClass': _modelClassToInt(module.modelClass),
    'modelSize': _modelSizeToInt(module.modelSize),
  });

  if (result == null) return null;
  return ModelInfo.fromMap(result);
}