diff --git a/lib/src/robot/client.dart b/lib/src/robot/client.dart index 983b92e7db6..a45c513120a 100644 --- a/lib/src/robot/client.dart +++ b/lib/src/robot/client.dart @@ -349,4 +349,14 @@ class RobotClient { final response = await _client.discoverComponents(request); return response.discovery.map((d) => Discovery.fromProto(d)).toList(); } + + /// GetModelsFromModules returns the list of models supported in modules on the machine. + /// + /// ``` + /// var modelsFromModules = await machine.getModelsFromModules(); + /// ``` + Future> getModelsFromModules() async { + final response = await _client.getModelsFromModules(request); + return response.model.map((d) => ModuleModel.fromProto(d)).toList(); + } }