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? uriOffset = uri == null ? null
      : fbBuilder.writeString(uri!);
  final int? embeddedImageOffset = embeddedImage?.pack(fbBuilder);
  fbBuilder.startTable(2);
  fbBuilder.addOffset(0, uriOffset);
  fbBuilder.addOffset(1, embeddedImageOffset);
  return fbBuilder.endTable();
}