parseList method

dynamic parseList(
  1. dynamic count,
  2. dynamic itemCallback
)

Parse a list of items. Record count is optional, if omitted it is read from the stream. itemCallback is one of the Parser methods.

Implementation

parseList(count, itemCallback) {
  if (itemCallback == null) {
      itemCallback = count;
      count = parseUShort();
  }
  var list = [];
  for (var i = 0; i < count; i++) {
    list.add( itemCallback.call(this) );
  }

  // print(" parseList list count: ${count} ");
  // print(list);


  return list;
}