1// automatically generated by the FlatBuffers compiler, do not modify 2// ignore_for_file: unused_import, unused_field, unused_local_variable 3 4library my_game.example2; 5 6import 'dart:typed_data' show Uint8List; 7import 'package:flat_buffers/flat_buffers.dart' as fb; 8 9import './monster_test_my_game_generated.dart' as my_game; 10import './monster_test_my_game.example_generated.dart' as my_game_example; 11 12class Monster { 13 Monster._(this._bc, this._bcOffset); 14 factory Monster(List<int> bytes) { 15 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes); 16 return reader.read(rootRef, 0); 17 } 18 19 static const fb.Reader<Monster> reader = const _MonsterReader(); 20 21 final fb.BufferContext _bc; 22 final int _bcOffset; 23 24 25 @override 26 String toString() { 27 return 'Monster{}'; 28 } 29} 30 31class _MonsterReader extends fb.TableReader<Monster> { 32 const _MonsterReader(); 33 34 @override 35 Monster createObject(fb.BufferContext bc, int offset) => 36 new Monster._(bc, offset); 37} 38 39class MonsterObjectBuilder extends fb.ObjectBuilder { 40 41 MonsterObjectBuilder(); 42 43 /// Finish building, and store into the [fbBuilder]. 44 @override 45 int finish( 46 fb.Builder fbBuilder) { 47 assert(fbBuilder != null); 48 49 fbBuilder.startTable(); 50 return fbBuilder.endTable(); 51 } 52 53 /// Convenience method to serialize to byte list. 54 @override 55 Uint8List toBytes([String fileIdentifier]) { 56 fb.Builder fbBuilder = new fb.Builder(); 57 int offset = finish(fbBuilder); 58 return fbBuilder.finish(offset, fileIdentifier); 59 } 60} 61