ImmutableBytes constructor

ImmutableBytes(
  1. Uint8List bytes
)

Creates an immutable wrapper around the given bytes.

The bytes are copied to prevent external mutation.

Implementation

ImmutableBytes(Uint8List bytes) : _bytes = Uint8List.fromList(bytes);