readArray<T> method

List<T> readArray<T>(
  1. T func(), {
  2. int? arrayLen,
})

Implementation

List<T> readArray<T>(T Function() func, {int? arrayLen}) {
  var len = arrayLen;
  if (len == null || len < 0) {
    len = readUint32();
  }
  return List.generate(len, (_) => func());
}