Flatc does not consistently normalize property names within structs [Dart, master]
insertjokehere opened this issue · comments
Will Hughes commented
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
github-actions commented
This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale
, or this will be closed in 14 days.
Will Hughes commented
This is still an issue