writeListInt16 method

int writeListInt16(
  1. List<int> values
)

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

Implementation

int writeListInt16(List<int> values) {
  assert(!_inVTable);
  _prepare(_sizeofUint32, 1, additionalBytes: 2 * values.length);
  final result = _tail;
  var tail = _tail;
  _setUint32AtTail(tail, values.length);
  tail -= _sizeofUint32;
  for (final value in values) {
    _setInt16AtTail(tail, value);
    tail -= _sizeofInt16;
  }
  return result;
}