finish method

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

Finish building, and store into the fbBuilder.

Implementation

@override
int finish(fb.Builder fbBuilder) {
  final int? algorithmOffset =
      _algorithm == null ? null : fbBuilder.writeString(_algorithm!);
  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(11);
  fbBuilder.addOffset(0, algorithmOffset);
  fbBuilder.addOffset(1, keyIdOffset);
  fbBuilder.addOffset(2, keyIdShortOffset);
  fbBuilder.addOffset(3, creationTimeOffset);
  fbBuilder.addOffset(4, fingerprintOffset);
  fbBuilder.addOffset(5, keyIdNumericOffset);
  fbBuilder.addBool(6, _isSubKey);
  fbBuilder.addBool(7, _canSign);
  fbBuilder.addBool(8, _canEncrypt);
  fbBuilder.addOffset(9, identitiesOffset);
  fbBuilder.addOffset(10, subKeysOffset);
  return fbBuilder.endTable();
}