createArtifact method
Creates a new artifact for this revision.
Returns the high-level Artifact wrapper so callers can continue
working in the model layer. Use metadata to attach attributes during
creation (for example, format or render engine information).
final mesh = await revision.createArtifact('mesh', '/assets/hero.fbx');
final tex = await revision.createArtifact('textures', '/assets/hero_tex.zip',
metadata: {'format': 'png', 'resolution': '4k'},
);
Implementation
Future<Artifact> createArtifact(
String name,
String location, {
Map<String, String>? metadata,
}) async {
final response = await client.createArtifact(
kref.uri,
name,
location,
metadata: metadata,
);
return Artifact(response, client);
}