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? idOffset = _id == null ? null : fbBuilder.writeString(_id!);
  final int? commentOffset =
      _comment == null ? null : fbBuilder.writeString(_comment!);
  final int? emailOffset =
      _email == null ? null : fbBuilder.writeString(_email!);
  final int? nameOffset =
      _name == null ? null : fbBuilder.writeString(_name!);
  fbBuilder.startTable(4);
  fbBuilder.addOffset(0, idOffset);
  fbBuilder.addOffset(1, commentOffset);
  fbBuilder.addOffset(2, emailOffset);
  fbBuilder.addOffset(3, nameOffset);
  return fbBuilder.endTable();
}