pack method

  1. @override
int pack(
  1. Builder fbBuilder
)
override

Serialize the object using the given builder, returning the offset.

Implementation

@override
int pack(fb.Builder fbBuilder) {
  final int? dataOffset = data == null ? null
      : fbBuilder.writeListUint8(data!);
  fbBuilder.startTable(3);
  fbBuilder.addOffset(0, dataOffset);
  fbBuilder.addUint32(1, count);
  fbBuilder.addInt8(2, type.value);
  return fbBuilder.endTable();
}