Open Ticore opened 9 years ago
Patches are welcome :)
I'd prefer that rather than always adding it to the setter, to only do it if you specify a flag in the pubspec.yaml file, though. In particular, the current behavior is by design (see https://github.com/dart-lang/observe/blob/master/lib/transformer.dart#L368), because most of the time only getters need the annotation. This indirectly helps reduce some redundant metadata dart2js would preserve for a deployed app.
Another alternative, could redstone_mapper to use the annotation from the getter in their automatic encode/decode logic?
issue find in stackoverflow
Wrong decode() from redstone_mapper about observable object in web app
original class:
transformer generated:
@Field()
metadata missing in generated setter