Uint8ListBuilder class

Dynamic builder for constructing Uint8List with automatic capacity management.

This class provides an efficient way to build byte arrays when the final size is unknown. It automatically grows the internal buffer as needed, doubling capacity when more space is required.

Key features:

  • Automatic buffer growth (starts at ~100KB)
  • Efficient memory management with buffer doubling
  • View-based data access (no unnecessary copying)
  • Optimized for sequential byte appending

Constructors

Uint8ListBuilder()

Properties

data Uint8List
Returns a view of the currently stored data without copying.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(List<int> bytes) → void
Appends bytes to the builder, growing the buffer if necessary.
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