ByteData fromUint8List(Uint8List uintsList)

Source

static ByteData fromUint8List(Uint8List uintsList) {
  return uintsList.buffer
      .asByteData(uintsList.offsetInBytes, uintsList.lengthInBytes);
}