mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-05 17:06:52 +00:00
chore: Dart 23.5.26 release (#8160)
* chore: update generated test code * chore: update changelog * update sdk constraints * chore: update readme * minor linter issues
This commit is contained in:
@@ -1,3 +1,17 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 23.5.26
|
||||||
|
|
||||||
|
- omit type annotationes for local variables (#7067, #7069, #7070)
|
||||||
|
- remove BSD 3-clause license (#7073)
|
||||||
|
- correctly parse lists of enums (#7157)
|
||||||
|
- align naming conventions for generated code (#7187)
|
||||||
|
- add `putBool` to fix errors when serializing structs with booleans (#7359)
|
||||||
|
- fix handling of +/-inf defaults in codegen (#7588)
|
||||||
|
- fix import issues in generated code (#7621)
|
||||||
|
- Fix incorrect storage of floats as ints in some cases (#7703)
|
||||||
|
- add final modifiers to the library implementation (#7943)
|
||||||
|
|
||||||
## 2.0.5
|
## 2.0.5
|
||||||
|
|
||||||
- switch to null safety (#6696)
|
- switch to null safety (#6696)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
This package is used to read and write [FlatBuffers](https://google.github.io/flatbuffers/).
|
This package is used to read and write [FlatBuffers](https://google.github.io/flatbuffers/).
|
||||||
|
|
||||||
Most consumers will want to use the [`flatc` - FlatBuffer compiler](https://github.com/google/flatbuffers) binary for your platform.
|
Most consumers will want to use the [`flatc` - FlatBuffer compiler](https://github.com/google/flatbuffers) binary for your platform.
|
||||||
You can find it in the `generator/{Platform}` directory of the [released package archive](https://pub.dev/packages/flat_buffers/versions/2.0.5.tar.gz).
|
You can download the flatc version matching your dart package version from [GitHub releases](https://github.com/google/flatbuffers/releases).
|
||||||
|
|
||||||
The FlatBuffer compiler `flatc` reads a FlatBuffers IDL schema and generates Dart code.
|
The FlatBuffer compiler `flatc` reads a FlatBuffers IDL schema and generates Dart code.
|
||||||
The generated classes can be used to read or write binary data/files that are interoperable with
|
The generated classes can be used to read or write binary data/files that are interoperable with
|
||||||
@@ -13,11 +13,3 @@ examples folder.
|
|||||||
For more details and documentation, head over to the official site and read the
|
For more details and documentation, head over to the official site and read the
|
||||||
[Tutorial](https://google.github.io/flatbuffers/flatbuffers_guide_tutorial.html) and how to
|
[Tutorial](https://google.github.io/flatbuffers/flatbuffers_guide_tutorial.html) and how to
|
||||||
[use FlatBuffers in Dart](https://google.github.io/flatbuffers/flatbuffers_guide_use_dart.html).
|
[use FlatBuffers in Dart](https://google.github.io/flatbuffers/flatbuffers_guide_use_dart.html).
|
||||||
|
|
||||||
## Dart 2.0 notes
|
|
||||||
Version 2.0.5 ships with it's own custom build of `flatc` because this is an extraordinary release to catch-up
|
|
||||||
with FlatBuffers for other platforms. This generator can only generate dart code (to avoid generating code for other platforms which isn't released yet).
|
|
||||||
On the other hand, the generated code still produces standard binary FlatBuffers compatible with other languages.
|
|
||||||
In other words: only `flatc --dart ...` works with this generator, but your app will be able to produce and read standard binary (`Uint8List`) FlatBuffers that are fully compotible with other languages supporting FlatBuffers (e.g. Java, C++, ...).
|
|
||||||
|
|
||||||
In the future a common `flatc` binary for all platforms would be shipped through GitHub release page instead.
|
|
||||||
|
|||||||
@@ -5,11 +5,10 @@ homepage: https://github.com/google/flatbuffers
|
|||||||
documentation: https://google.github.io/flatbuffers/index.html
|
documentation: https://google.github.io/flatbuffers/index.html
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <4.0.0'
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
test: ^1.17.7
|
test: ^1.17.7
|
||||||
test_reflective_loader: ^0.2.0
|
test_reflective_loader: ^0.2.0
|
||||||
path: ^1.8.0
|
path: ^1.8.0
|
||||||
lints: ^1.0.1
|
lints: ^1.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import './monster_test_my_game.example_generated.dart' as example;
|
|||||||
import './monster_test_my_game.example2_generated.dart' as example2;
|
import './monster_test_my_game.example2_generated.dart' as example2;
|
||||||
import './list_of_enums_generated.dart' as example3;
|
import './list_of_enums_generated.dart' as example3;
|
||||||
import './bool_structs_generated.dart' as example4;
|
import './bool_structs_generated.dart' as example4;
|
||||||
import './keyword_test_keyword_test_generated.dart' as keyword_test;
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
defineReflectiveSuite(() {
|
defineReflectiveSuite(() {
|
||||||
@@ -146,8 +145,7 @@ class CheckOtherLangaugesData {
|
|||||||
'longEnumNormalDefault: LongEnum{value: 2}, nanDefault: NaN, '
|
'longEnumNormalDefault: LongEnum{value: 2}, nanDefault: NaN, '
|
||||||
'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: '
|
'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: '
|
||||||
'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: '
|
'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: '
|
||||||
'-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}'
|
'-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}');
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -769,7 +767,6 @@ class BuilderTest {
|
|||||||
class ObjectAPITest {
|
class ObjectAPITest {
|
||||||
void test_tableStat() {
|
void test_tableStat() {
|
||||||
final object1 = example.StatT(count: 3, id: "foo", val: 4);
|
final object1 = example.StatT(count: 3, id: "foo", val: 4);
|
||||||
expect(object1 is Packable, isTrue);
|
|
||||||
final fbb = Builder();
|
final fbb = Builder();
|
||||||
fbb.finish(object1.pack(fbb));
|
fbb.finish(object1.pack(fbb));
|
||||||
final object2 = example.Stat(fbb.buffer).unpack();
|
final object2 = example.Stat(fbb.buffer).unpack();
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ struct Vec3 (force_align: 8) {
|
|||||||
test3:Test;
|
test3:Test;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stats for monster
|
|
||||||
|
|
||||||
struct Ability {
|
struct Ability {
|
||||||
id:uint(key);
|
id:uint(key);
|
||||||
distance:uint;
|
distance:uint;
|
||||||
|
|||||||
Reference in New Issue
Block a user