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? nameOffset = _name == null ? null
      : fbBuilder.writeString(_name!);
  final int? channelsOffset = _channels == null ? null
      : fbBuilder.writeList(_channels!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
  fbBuilder.startTable(2);
  fbBuilder.addOffset(0, nameOffset);
  fbBuilder.addOffset(1, channelsOffset);
  return fbBuilder.endTable();
}