getModelPath static method

Future<String?> getModelPath(
  1. String modelId
)

Get the local file path for a downloaded model Returns null if model is not downloaded

Implementation

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