writeListUint16 method

int writeListUint16(
  1. List<int> values
)

Write the given list of unsigned 16-bit integer values.

Implementation

int writeListUint16(List<int> values) {
  _ensureNoVTable();
  _prepare(_sizeofUint32, 1, additionalBytes: 2 * values.length);
  final int result = _tail;
  int tail = _tail;
  _setUint32AtTail(_buf, tail, values.length);
  tail -= _sizeofUint32;
  for (int value in values) {
    _setUint16AtTail(_buf, tail, value);
    tail -= _sizeofUint16;
  }
  return result;
}