getVersion method

String getVersion(
  1. Uint8List data
)

Get DAAP protocol version.

Implementation

String getVersion(Uint8List data) {
  // generally version is two short unsigned integers
  // ignore: lines_longer_than_80_chars
  return "${ByteData.view(data.buffer, 0, 2).getUint16(0)}.${ByteData.view(data.buffer, 2, 2).getUint16(0)}";
}