PayloadSpec class
A binary chunk in the document's payload manifest: a descriptor plus, when the document's payloads are loaded, the chunk bytes.
The descriptor is what the text form carries; the bytes live in the package and are attached when the document's payloads are loaded.
Constructors
- PayloadSpec(LocalId id, {required PayloadEncoding encoding, String? layout, String? format, int? width, int? height, int? length, Uint8List? bytes})
-
Creates a payload descriptor with the given stable
id.
Properties
- bytes ↔ Uint8List?
-
The chunk bytes, when the document's payloads are loaded; otherwise
null (a manifest-only document).
getter/setter pair
- encoding → PayloadEncoding
-
How the bytes are interpreted.
final
- format → String?
-
For PayloadEncoding.image, the pixel format (
rgba8, ...); otherwise null.final - hashCode → int
-
The hash code for this object.
no setterinherited
- height → int?
-
For image payloads, the pixel height.
final
- id → LocalId
-
This payload's stable id.
final
- layout → String?
-
For PayloadEncoding.vertexBuffer, the vertex layout (
unskinned/skinned); otherwise null.final - length → int?
-
The chunk's byte length, when known.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → int?
-
For image payloads, the pixel width.
final
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