getAvailableModels static method
Get list of all available models from the bundled model list
Implementation
static Future<List<ModelInfo>> getAvailableModels() async {
try {
final result = await _channel.invokeMethod('getAvailableModels');
final modelList = result as List<dynamic>;
return modelList
.map((m) => ModelInfo.fromMap(Map<String, dynamic>.from(m as Map)))
.toList();
} on PlatformException catch (e) {
throw Exception('Failed to get available models: ${e.message}');
}
}