writeFixedArray method

BcsWriter writeFixedArray(
  1. dynamic vector,
  2. int? size,
  3. dynamic cb(
    1. BcsWriter writer,
    2. dynamic el,
    3. int i,
    4. int len,
    )
)

Implementation

BcsWriter writeFixedArray(
  dynamic vector,
  int? size,
  dynamic Function(BcsWriter writer, dynamic el, int i, int len) cb
) {
  final lst = List.from(vector);
  lst.sublist(0, size ?? lst.length).asMap().forEach((i, el) => cb(this, el, i, vector.length));
  return this;
}