flatbuffers
flatbuffers copied to clipboard
Flatc does not consistently normalize property names within structs [Dart, master]
When generating Dart code, flatc normalizes most properties to "lower camel case" style, except inside structs. This means that schemas like this:
struct Settings {
foo_bar : uint8;
}
table Content {
settings : Settings;
}
Will generate invalid Dart code:
class SettingsT implements fb.Packable {
int fooBar;
SettingsT({
required this.fooBar});
@override
int pack(fb.Builder fbBuilder) {
fbBuilder.putUint8(foo_bar);
return fbBuilder.offset;
}
@override
String toString() {
return 'SettingsT{fooBar: $fooBar}';
}
}
Note foo_bar vs fooBar