finish method
Finish building, and store into the fbBuilder
.
Implementation
@override
int finish(fb.Builder fbBuilder) {
final int? messageOffset =
_message == null ? null : fbBuilder.writeListUint8(_message!);
final int? publicKeyOffset =
_publicKey == null ? null : fbBuilder.writeString(_publicKey!);
final int? optionsOffset = _options?.getOrCreateOffset(fbBuilder);
final int? signedOffset = _signed?.getOrCreateOffset(fbBuilder);
final int? fileHintsOffset = _fileHints?.getOrCreateOffset(fbBuilder);
fbBuilder.startTable(5);
fbBuilder.addOffset(0, messageOffset);
fbBuilder.addOffset(1, publicKeyOffset);
fbBuilder.addOffset(2, optionsOffset);
fbBuilder.addOffset(3, signedOffset);
fbBuilder.addOffset(4, fileHintsOffset);
return fbBuilder.endTable();
}