deserializeArray function

dynamic deserializeArray(
  1. Type self,
  2. SerialBuffer buffer, {
  3. SerializerState? state,
  4. dynamic allowExtensions = true,
})

Implementation

deserializeArray(Type self, SerialBuffer buffer, {SerializerState? state, allowExtensions = true}) {
  if (state == null) state = SerializerState();
  var len = buffer.getVaruint32();
  var result = [];
  for (var i = 0; i < len; ++i) {
    result.add(self.arrayOf!.deserialize?.call(self.arrayOf, buffer, state: state, allowExtensions: false));
  }
  return result;
}