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? childrenOffset = _children == null ? null
      : fbBuilder.writeListInt32(_children!);
  final int? nodesOffset = _nodes == null ? null
      : fbBuilder.writeList(_nodes!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
  final int? texturesOffset = _textures == null ? null
      : fbBuilder.writeList(_textures!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
  final int? animationsOffset = _animations == null ? null
      : fbBuilder.writeList(_animations!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
  fbBuilder.startTable(5);
  fbBuilder.addOffset(0, childrenOffset);
  if (_transform != null) {
    fbBuilder.addStruct(1, _transform!.finish(fbBuilder));
  }
  fbBuilder.addOffset(2, nodesOffset);
  fbBuilder.addOffset(3, texturesOffset);
  fbBuilder.addOffset(4, animationsOffset);
  return fbBuilder.endTable();
}