of method

Uint8List of(
  1. Uint8List bytes
)

bytes, a whole file, cut to this range: what a reader does with a source that could not read a range itself.

Implementation

Uint8List of(Uint8List bytes) => Uint8List.sublistView(
  bytes,
  start.clamp(0, bytes.length),
  (end ?? bytes.length).clamp(start.clamp(0, bytes.length), bytes.length),
);