ImmutableBuffer class Null safety

A handle to a read-only byte buffer that is managed by the engine.

The creator of this object is responsible for calling dispose when it is no longer needed.


debugDisposed bool
Whether dispose has been called.
hashCode int
The hash code for this object.
read-only, inherited
length int
The length, in bytes, of the underlying data.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


dispose() → void
Release the resources used by this object. The object is no longer usable after this method is called.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() String
A string representation of this object.


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

Static Methods

fromAsset(String assetKey) Future<ImmutableBuffer>
Create a buffer from the asset with key assetKey.
fromUint8List(Uint8List list) Future<ImmutableBuffer>
Creates a copy of the data from a Uint8List suitable for internal use in the engine.