finish method
Finish building, and store into the fbBuilder
.
Implementation
@override
int finish(fb.Builder fbBuilder) {
final int? keyIdOffset =
_keyId == null ? null : fbBuilder.writeString(_keyId!);
final int? keyIdShortOffset =
_keyIdShort == null ? null : fbBuilder.writeString(_keyIdShort!);
final int? creationTimeOffset =
_creationTime == null ? null : fbBuilder.writeString(_creationTime!);
final int? fingerprintOffset =
_fingerprint == null ? null : fbBuilder.writeString(_fingerprint!);
final int? keyIdNumericOffset =
_keyIdNumeric == null ? null : fbBuilder.writeString(_keyIdNumeric!);
final int? identitiesOffset = _identities == null
? null
: fbBuilder.writeList(
_identities!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
final int? subKeysOffset = _subKeys == null
? null
: fbBuilder.writeList(
_subKeys!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
fbBuilder.startTable(10);
fbBuilder.addOffset(0, keyIdOffset);
fbBuilder.addOffset(1, keyIdShortOffset);
fbBuilder.addOffset(2, creationTimeOffset);
fbBuilder.addOffset(3, fingerprintOffset);
fbBuilder.addOffset(4, keyIdNumericOffset);
fbBuilder.addBool(5, _isSubKey);
fbBuilder.addBool(6, _encrypted);
fbBuilder.addBool(7, _canSign);
fbBuilder.addOffset(8, identitiesOffset);
fbBuilder.addOffset(9, subKeysOffset);
return fbBuilder.endTable();
}