Skip to content

Releases: google/built_value.dart

Many features, improvements and fixes

20 Dec 10:36
584a775
Compare
Choose a tag to compare

New features:

  • Add serialize field to @BuiltValueField. Use this to tag fields to skip
    when serializing.
  • Add wireName field to @BuiltValue and @BuiltValueField. Use this to
    override the wire name for classes and fields when serializing.
  • Add @BuiltValueEnum and @BuiltValueEnumConst annotations for specifying
    settings for enums. Add wireName field to these to override the wire names
    in enums when serializing.
  • Add support for polymorphism to StandardJsonPlugin. It will now specify
    type names as needed via a discriminator field, which by defualt is
    called $. This can be changed in the StandardJsonPlugin constructor.
  • Add BuiltListAsyncDeserializer. It provides a way to deserialize large
    responses without blocking, provided the top level serialized type is
    BuiltList.
  • Add built in serializer for Uri.

Improvements:

  • Allow declaration of multiple Serializers in the same file.
  • Explicitly disallow private fields; fail with an error during generation if
    one is found.
  • Improve error message for field without type.

Fixes:

  • Fix generated builder when fields hold function types.
  • Fix checks and generated builder when manually maintained builder has
    generics.
  • Fix name of classes generated from a private class.
  • Fix builder and serializer generation when importing with a prefix.

Support skipping fields for comparison

28 Nov 15:07
218cef4
Compare
Choose a tag to compare
  • New annotation, BuiltValueField, for configuring fields. First
    setting available is compare. Set to false to ignore a particular field
    for operator== and hashCode.
  • Generator now has a const constructor.

Fix for built_collection 2.0.0

20 Nov 16:49
4571e16
Compare
Choose a tag to compare

The built_collection package now has separate interfaces and implementations, which changes the runtimeType of collection instances. Most people don't need to worry about this, but built_value now needs to be a bit smarter about serialization.

Allow quiver 0.26

09 Nov 09:31
c35f2af
Compare
Choose a tag to compare
Merge pull request #259 from davidmorgan/bump-quiver

Allow quiver 0.26. Release 4.3.3.

Fix generation with multiple levels of inheritance

30 Oct 12:55
7e7c47b
Compare
Choose a tag to compare

v4.3.1 introduced a NPE when you have multiple levels of inheritance of interfaces; now fixed.

Fix generation with mixins

30 Oct 11:10
beeb459
Compare
Choose a tag to compare

Support implementing an interface and at the same time providing a mixin that implements part of the interface.

Now, for such fields, no code is generated; they are concrete fields.

Support serializing Int64

26 Oct 09:21
Compare
Choose a tag to compare

Serialization now supports Int64 from package:fixnum.

Correct handling of import prefixes

17 Oct 15:41
Compare
Choose a tag to compare

Fixes some corner cases in generation.

Dart2js workaround; custom toString()

25 Sep 07:29
Compare
Choose a tag to compare
  • Generated code ignores more lints.
  • Add a workaround so "polymorphism" features can be used with dart2js.
    See example/lib/polymorphism.dart.
  • Deal explicitly with the user defining their own operator==, hashCode
    and/or toString(). Previously, they would just not work. Now, custom
    operator== and hashCode are forbidden at compile time, but custom
    toString() is supported.

Silence some lints

14 Sep 12:12
Compare
Choose a tag to compare
  • Generated code now has ignore_for_file for a few lints.
  • Improve generator performance, remove an unneeded "computeNode".