Kref class

A Kumiho Artifact Reference (URI-based unique identifier).

Kref provides utility methods for parsing and extracting components from the URI while behaving like a regular String.

final kref = Kref('kref://project/models/hero.model?r=2&a=mesh');

print(kref.project);       // 'project'
print(kref.space);         // 'models'
print(kref.itemName);      // 'hero'
print(kref.kind);          // 'model'
print(kref.revision);      // 2
print(kref.artifactName);  // 'mesh'

Constructors

Kref(String uri, {bool validate = true})
Creates a new Kref from the given URI string.

Properties

artifactName String?
Gets the artifact name, or null if not specified.
no setter
fullItemName String
Gets the full item name including kind (e.g., "hero.model").
no setter
hashCode int
The hash code for this object.
no setteroverride
itemKref Kref
Gets the item kref (without revision or artifact).
no setter
itemName String
Gets the item name without kind (e.g., "hero").
no setter
kind String
Gets the item kind (e.g., "model").
no setter
project String
Gets the project name from the kref.
no setter
revision int?
Gets the revision number, or null if not specified.
no setter
revisionKref Kref?
Gets the revision kref (without artifact).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
space String
Gets the space path from the kref.
no setter
uri String
The raw URI string.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
withArtifact(String name) Kref
Creates a new kref with an artifact name.
withRevision(int number) Kref
Creates a new kref with a revision number.

Operators

operator ==(Object other) bool
The equality operator.
override