getModel method
Generated-proto registry get-by-id surface.
Mirrors Swift RunAnywhere.getModel(_:).
Implementation
Future<ModelGetResult> getModel(ModelGetRequest request) async {
if (!DartBridge.isInitialized) {
return ModelGetResult(found: false, errorMessage: 'SDK not initialized');
}
final model = await DartBridgeModelRegistry.instance.getProtoModel(
request.modelId,
);
if (model == null) {
return ModelGetResult(found: false);
}
return ModelGetResult(found: true, model: model);
}