isModelDownloaded static method

Future<bool> isModelDownloaded(
  1. String modelId
)

Check if a model is already downloaded

Implementation

static Future<bool> isModelDownloaded(String modelId) async {
  try {
    final result = await _channel.invokeMethod('isModelDownloaded', {
      'modelId': modelId,
    });
    return result as bool;
  } on PlatformException catch (e) {
    throw Exception('Failed to check model download status: ${e.message}');
  }
}