writeCount method

List<E> writeCount(
  1. MemoryPointer<RType> p,
  2. List<E> values
)

Writes values into the array this field points to, within the struct at p. The pointed-to memory must already be allocated with room for at least values.length elements (see allocate).

Returns values.

Throws StateError if the codec doesn't support contiguous arrays.

Implementation

List<E> writeCount(MemoryPointer p, List<E> values) {
  final ref = codec.deref(p.offsetBy(offset));
  if (ref.isNull) return values;
  _innerArray().writeArray(ref, values);
  return values;
}