getArtifact method

Future<Artifact> getArtifact(
  1. String name
)

Gets an artifact by name.

Resolves the artifact kref by combining kref and the name, then returns the model wrapper.

final mesh = await revision.getArtifact('mesh');

Implementation

Future<Artifact> getArtifact(String name) async {
  final artifactKref = kref.withArtifact(name);
  final response = await client.getArtifact(artifactKref.uri);
  return Artifact(response, client);
}