SharedBytes class abstract interface

A live JavaScript Uint8Array window, retained while this object is reachable.

Unlike ordinary Uint8List bindings, this type shares mutations. Each access checks the current window; detached and out-of-bounds views throw. Resizable ArrayBuffers are supported, but SharedArrayBuffers are not.

Constructors

SharedBytes.allocate(int length)
Allocates a zero-filled, fixed-size host buffer in the current module. Requires an initialized generated binding and an active runtime owner.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
length → int
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyFrom(SharedBytes source, {int sourceOffset = 0, int targetOffset = 0, int? length}) → void
Copies a current source window; overlapping ranges behave like memmove.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subview(int start, [int? end]) → SharedBytes
Returns a shared, fixed-length view of start through end (exclusive).
toString() → String
A string representation of this object.
inherited
toUint8List([int start = 0, int? end]) → Uint8List
Copies the selected current window into an independent Dart byte list.
write(Uint8List source, {int offset = 0}) → void
Copies source into this window starting at offset.

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](int index) → int
operator []=(int index, int value) → void