toUint8List method

Uint8List toUint8List()

Returns the bytes as a Uint8List.

Example:

final bytes = Byte.fromList([100, -56, 0]);
final uint8List = bytes.toUint8List();  // Uint8List with [100, 200, 0]

Implementation

Uint8List toUint8List() => Uint8List.fromList(toUnsignedList());