writeCountIf method
Like writeCount, but does nothing if the struct pointer p is null.
Always returns the given list, whether or not the write happened.
Implementation
List<E> writeCountIf(MemoryPointer? p, List<E> values) {
if (p == null) return values;
final ref = codec.deref(p.offsetBy(offset));
_innerArray().writeArray(ref, values);
return values;
}