Repository navigation
Fixes, improvements and @BuiltValueHook
New features:
- Add
@BuiltValueHookannotation. It provides the same functionality as
_initializeBuilderand_finalizeBuilder, but in a more visible way:
annotate a static method on the value class with@BuiltValueHookto
have it called on builder creation or finalization. - Add back
serializeNullstoBuiltValueSerializerannotation. By default
generated serializers skip null fields instead of writing them; set
serializeNullsto write the nulls.
New minor functionality:
- Support use of nulls in collections when the key or value types are
explicitly nullable. - Allow
JsonObjectto be instantiated from aMap<dynamic, dynamic>. - Mark nested builder getters in
instantiable: falseclasses not nullable,
to match the implementations. UseautoCreateNestedBuilders: falseto get
the old behaviour. - Allow explicit nulls in JSON for nullable fields when deserializing.
- Specify annotation targets; the analyzer will now hint if a
built_value
annotation is used where it has no effect. - Support polymorphism with mixed in parent value type: generated builder
now mixes in parent builder.
Bug fixes:
- Fix support for serializing and deserializing nulls.
- Fix
nestedBuilders: falsewithinstantiable: false. - Fix enum deserialization fallback for
int. - Annotating a wrong type getter with
@SerializersForis now an error,
instead of just generating nothing.
Cleanup:
- Removed Angular mixin from example, as this feature is no longer needed:
Angular now directly supports using static members in templates.