ComponentPropertyDef class
A declared, editable property of a component type.
A component's ComponentCodec.propertySchema lists these in display order. Each entry is the single description of one property: its name (the key in the ComponentSpec.properties bag), its kind, its defaultValue (also the value used when the key is absent), and optional metadata for editors and tooling. When read is given, the base ComponentCodec.serialize derives the serialized value from a live component, so a codec never hand-writes both a schema and a serializer for the same field.
Constructors
-
ComponentPropertyDef(String name, ComponentPropertyKind kind, PropertyValue? defaultValue, {String? doc, String? resourceKind, List<
String> ? options, double? min, double? max, PropertyValue read(Component component)?}) -
Declares property
nameofkindwithdefaultValue.const
Properties
- defaultValue → PropertyValue?
-
The value used when the property is absent from a spec, or null for a
required property with no default (a mesh's geometry/material reference).
final
- doc → String?
-
A short human/agent-readable description of the property.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → ComponentPropertyKind
-
The property's editable type.
final
- max → double?
-
An optional inclusive upper bound for numeric kinds.
final
- min → double?
-
An optional inclusive lower bound for numeric kinds.
final
- name → String
-
The property key in the ComponentSpec.properties bag.
final
-
options
→ List<
String> ? -
For ComponentPropertyKind.string enums, the allowed values.
final
- read → PropertyValue Function(Component component)?
-
Reads this property's value from a live
component, used by the derived ComponentCodec.serialize. Null for codecs that serialize by hand.final - resourceKind → String?
-
For ComponentPropertyKind.resourceRef, the kind of resource referenced
(
geometry,material, ortexture), so an editor can filter the picker.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited