encodeUint16List method
Implementation
Uint8List encodeUint16List() {
final length = this.length;
final bs = Uint8List(length * 2);
final byteData = bs.asByteData();
var byteDataOffset = 0;
for (var i = 0; i < length; ++i) {
var n = this[i];
byteData.setUint16(byteDataOffset, n);
byteDataOffset += 2;
}
return bs;
}