serializeArray function

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

Implementation

serializeArray(Type self, SerialBuffer buffer, dynamic data, {SerializerState? state, allowExtensions = true}) {
  if (state == null) state = SerializerState();
  buffer.pushVaruint32((data as List).length);
  for (var item in data) {
    self.arrayOf!.serialize?.call(self.arrayOf, buffer, item, state: state, allowExtensions: false);
  }
}