Lines Matching full:dart
1 Use in Dart {#flatbuffers_guide_use_dart}
6 Before diving into the FlatBuffers usage in Dart, it should be noted that
8 to general FlatBuffers usage in all of the supported languages (including Dart).
10 Dart.
17 ## FlatBuffers Dart library code location
19 The code for the FlatBuffers Dart library can be found at
20 `flatbuffers/dart`. You can browse the library code on the [FlatBuffers
21 GitHub page](https://github.com/google/flatbuffers/tree/master/dart).
23 ## Testing the FlatBuffers Dart library
25 The code to test the Dart library can be found at `flatbuffers/tests`.
26 The test code itself is located in [dart_test.dart](https://github.com/google/
27 flatbuffers/blob/master/tests/dart_test.dart).
32 *Note: The shell script requires the [Dart SDK](https://www.dartlang.org/tools/sdk)
35 ## Using the FlatBuffers Dart library
38 example of how to use FlatBuffers in Dart.*
40 FlatBuffers supports reading and writing binary FlatBuffers in Dart.
42 To use FlatBuffers in your own code, first generate Dart classes from your
43 schema with the `--dart` option to `flatc`. Then you can include both FlatBuffers
46 For example, here is how you would read a FlatBuffer binary file in Dart: First,
50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.dart}
51 import 'dart:io' as io;
53 import 'package:flat_buffers/flat_buffers.dart' as fb;
54 import './monster_my_game.sample_generated.dart' as myGame;
62 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.dart}
67 ## Differences from the Dart SDK Front End flat_buffers
70 internally by the Dart SDK in the front end/analyzer package. Several
79 2. The SDK implementation supports enums with regular Dart enums, which
82 ensure proper mapping from FlatBuffers to Dart and other platforms.
86 non-Dart implementations, and properly handles vectors of structs. Many of
92 numbers as floats. Supporting the Dart VM and Flutter was a more important
103 from Dart, though you could use the C++ parser through Dart Native Extensions.