PropertyReader class final Assets and loading

Typed access to a component spec's property bag during realize, with schema defaults as fallbacks and former names resolved.

Constructors

PropertyReader(ComponentSpec _spec, ComponentCodec _codec, RealizeContext context)

Properties

context → RealizeContext
The realize context (resource realizer, node resolution, afterRealize).
final
hashCode → int
The hash code for this object.
no setterinherited
properties → Map<String, PropertyValue>
The raw property bag, for codecs handling legacy shapes directly.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

boolean(String name) → bool
enumValue<T extends Enum>(String name, List<T> values) → T
The enum value named by string property name, or the declared default (then the first value) when absent or unrecognized. An unrecognized name (a newer writer or a typo) is reported, since serialize rebuilds from the live value and a save would silently replace it.
integer(String name) → int
nodeId(String name) → LocalId?
The referenced node id for name, or null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
number(String name) → double
resourceId(String name) → LocalId?
The referenced resource id for name, or null.
string(String name) → String
toString() → String
A string representation of this object.
inherited
value(String name) → PropertyValue?
The raw value for name, accepting the descriptor's former names.
vec2(String name) → Vector2
vec3(String name) → Vector3
vec4(String name) → Vector4

Operators

operator ==(Object other) → bool
The equality operator.
inherited