ImmutableBytes class

An immutable wrapper around a Uint8List with value-based equality.

Useful for passing byte arrays through maps, sets, and other collections without accidental mutation.

Constructors

ImmutableBytes(Uint8List bytes)
Creates an immutable wrapper around the given bytes.

Properties

hashCode int
The hash code for this object.
no setteroverride
length int
The length of the byte array.
no setter
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
toBytes() Uint8List
Returns a copy of the underlying bytes.
toString() String
A string representation of this object.
inherited

Operators

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