Lines Matching +full:build +full:- +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.
13 documentation to build `flatc` and should be familiar with
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
37 *Note: See [Tutorial](@ref flatbuffers_guide_tutorial) for a more in-depth
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
81 require that. This implementation uses specialized enum-like classes to
82 ensure proper mapping from FlatBuffers to Dart and other platforms.
84 vectors of structs - it treated everything as a built-in scalar or a table.
86 non-Dart implementations, and properly handles vectors of structs. Many of
90 compatibility - however, it should be possible to use the JavaScript
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.
105 not currently an option in Flutter - follow [this issue](https://github.com/flutter/flutter/issues/…
112 (requiring pre-order construction of all data, and making mutation harder).
115 can be used (through `--gen-object-api`) that is able to unpack & pack a FlatBuffer
120 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.dart}
124 // Update object directly like a Dart class instance.