NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev, #20 most downloaded on pub.dev
Value types with builders, Dart classes as enums, and serialization. This library is the runtime dependency.
Latest stable
8.13.0
Last release 2 months ago
02 Sep 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
162 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Split analysis plugin out into new package, built_value_analyzer_plugin. Bump built_value_generator dependency on analyzer to 0.39.0 so it supports ex
built_value_analyzer_plugin.
Bump built_value_generator dependency on analyzer to 0.39.0 so it
supports extension methods.Add example folders with README.md pointing to examples.
example folders with README.md pointing to examples.Internal: cleanup for pedantic v1.9.0 lints.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Internal: cleanup for pedantic v1.9.0 lints.
Internal: cleanup for pedantic v1.9.0 lints.
Internal: clean up built_value_generator -> built_value dependency; depend on minor instead of major version so we can in future handle tight coupling
built_value_generator -> built_value dependency;
depend on minor instead of major version so we can in future handle tight
coupling between the two without a major version bump to built_value.Fix _finalizeBuilder generation so it uses the correct class name.
Support _initializeBuilder hook in value types. If found, it's executed when a Builder is created and can be used to set defaults.
_initializeBuilder hook in value types. If found, it's executed
when a Builder is created and can be used to set defaults._finalizeBuilder hook in value types. If found, it's executed
when build is called and can be used to apply processing to fields.defaultCompare and defaultSerialize to @BuiltValue. They
control the defaults for compare and serialize in @BuiltValueField.Serializers instances via Serializers.merge,
SerializersBuilder.merge and SerializersBuilder.mergeAll.operator== when a field is called other.num deserialization so it does not always convert to double.analyzer.DartType.displayName with custom code
generator.Support _initializeBuilder hook in value types. If found, it's executed when a Builder is created and can be used to set defaults.
_initializeBuilder hook in value types. If found, it's executed
when a Builder is created and can be used to set defaults._finalizeBuilder hook in value types. If found, it's executed
when build is called and can be used to apply processing to fields.defaultCompare and defaultSerialize to @BuiltValue. They
control the defaults for compare and serialize in @BuiltValueField.Serializers instances via Serializers.merge,
SerializersBuilder.merge and SerializersBuilder.mergeAll.operator== when a field is called other.num deserialization so it does not always convert to double.analyzer.DartType.displayName with custom code
generator.Fix codegen for custom builders when fields use types that have an import prefix.
analyzer_plugin.Generate code compatible with 'no raw types'.
Allow providing your own toString via a mixin.
toString via a mixin.BuiltValueSerializer(serializeNulls: true) for non-primitive fields.0.34.0.Add Iso8601DurationSerializer for use when you want ISO8601 serialization instead of the default microseconds serialization.
Iso8601DurationSerializer for use when you want ISO8601 serialization
instead of the default microseconds serialization.analyzer, analyzer_plugin and build_config.Add @BuiltValue(generateBuilderOnSetField: true) which provides a way to listen for set calls on generated builders.
@BuiltValue(generateBuilderOnSetField: true) which provides a way to
listen for set calls on generated builders.@BuiltValueEnumConst(fallback: true) as a way to mark an enum const
as the fallback when valueOf or deserialization fails.@BuiltValueSerializer(serializeNulls: true as a way to modify the wire
format to explicitly contain null values.Serializers instances: add a builderFactories
getter that returns installed builder factories.Function syntax everywhere.Built
types or built_collection collections.- Allow analyzer 0.35.0.
analyzer 0.35.0.Fix BuiltList serialization when using StandardJsonPlugin with unspecified type and when list length is 1.
BuiltList serialization when using StandardJsonPlugin with unspecified type and when list length is 1.Allow custom builders to use setter/getter pairs instead of normal fields.
@BuiltValue to turn off auto instantiation of nested
builders.@BuiltValueSerializer annotation which gives the option to specify a
custom serializer for a class.Serializers instances: add a serializers
getter that returns the installed serializers.RegExp fields.analyzer 0.34.0.Add an option to @BuiltValue to generate comparable builders.
New features:
@BuiltValue to generate comparable builders.Duration fields.serializerForType and serializerForWireName methods to Serializers.Improvements:
avoid_as lint to generated code.built_value.dart when EnumClass is used; this
was expensive.Fixes:
mixin declarations are used.Switch to new analyzer API in version 0.33.3.
0.33.3.Bump versions of analyzer, analyzer_plugin, build, build_runner.
analyzer, analyzer_plugin, build, build_runner.Allow polymorphic base classes to omit implementing Built while still implementing any other interface(s).
Built while still
implementing any other interface(s).wireName settings.build version 1.0.Add built_value_test support for remaining built collections.
built_value_test support for remaining built collections.Fix generated operator== when a type uses generic functions.
operator== when a type uses generic functions.curly_braces_in_control_flow lint.- Allow build_runner 0.10.0.
build_runner 0.10.0.Improve generation for operator==, don't use dynamic.
Breaking change: The "header" configuration on this builder is now ignored.
- Allow SDK 2.0.0.
Add ignores for lints 'lines_longer_than_80_chars' and 'avoid_catches_without_on_clauses' to generated code.
Bump versions of build_runner, build_config and shelf.
Fix violations of prefer_equal_for_default_values lint.
prefer_equal_for_default_values lint.Bump versions of analyzer, analyzer_plugin.
analyzer, analyzer_plugin.Support serializing BuiltSet with StandardJsonPlugin. It's serialized to a JSON list.
Improve error message on failure to deserialize.
dynamic type parameters from builder to value class. Previously, you could avoid the check by using the generated constructor called _.Removed dependency on build_config from built_value and added it to built_value_generator.
- Allow source_gen 0.8.0.
Make StandardJsonPlugin return Map , as the firebase libraries expect, instead of Map .
Make StandardJsonPlugin return Map<String, Object>, as the firebase libraries expect, instead of Map<Object, Object>.
Fix analyzer plugin loading. It should now work, provided you modify your analysis_options.yaml as suggested.
analysis_options.yaml as suggested.Add an experimental analyzer plugin that surfaces compile time generation errors as suggestions in your IDE. Turn it on by modifying your analysis_opt
analysis_options.yaml file to add plugins entries,
example.Add support for setting the generated header in a build.yaml file in your project. See example/build.yaml for an example.
BigInt.build.yaml file in your
project. See example/build.yaml for an example.Function and typedef types; these
fields need to be marked @BuiltValueField(serialize: false).BigInt.build.yaml file in your
project. See example/build.yaml for an example.Function and typedef types; these
fields need to be marked @BuiltValueField(serialize: false).@SerializersFor annotation list
contains an undefined symbol.Various other internal fixes, see CHANGELOG.
Various other internal fixes, see CHANGELOG.
Examples related to polymorphism have been simplified since Dart 2 does not support inheriting twice from an interface with different generic parameters. Better recommendation to follow later.
Fix a few places in built_value serialization that had cast warnings in DDC.
Fix a few places in built_value serialization that had cast warnings in DDC.
Upgrade to latest built_runner. You no longer need build.dart or watch.dart. Instead, make sure you have a dev dependency on built_value_generator and
built_runner. You no longer need build.dart or
watch.dart. Instead, make sure you have a dev dependency on
built_value_generator and build_runner, then run
pub run build_runner build or pub run build_runner watch.Generate simpler deserialization code for built_collection instances.
built_collection instances.Fix generated serialization code when a manually declared builder causes a field to not use a nested builder.
Fix generated serialization code when a manually declared builder causes a field to not use a nested builder.
Workaround for analyzer issue when implementing multiple classes that use @BuiltValue(instantiable: false).
Workaround for analyzer issue when implementing multiple classes that
use @BuiltValue(instantiable: false).
implementing multiple classes that
use @BuiltValue(instantiable: false).extends to allow for one special case: sharing of
code between built_value and const classes. The base class in question
must be abstract, have no fields, have no abstract getters and must not
implement operator==, hashCode or toString.Introduce restrictions on using built_value in unsupported ways:
extends in built_value classes. Classes should inherit
API using implements and API+implementation using extends Object with.show or as when importing
'package:built_value/built_value.dart'. The generated code needs access to
all symbols in the package with no import prefix.List, Set, Map,
ListMultimap and SetMultimap. Suggest built_collection equivalents
instead.If any of these restrictions causes problem for you, please file an issue on github: https://github.com/google/built_value.dart/issues
@BuiltValue(instantaible: false). They are now allowed to not
implement Builder (as a workaround for a dart2js issue); they are
allowed to omit fields; and they must omit constructor and factory.Error classes: BuiltValueNullFieldError,
BuiltValueMissingGenericsError and BuiltValueNestedFieldError. These
provide clearer error messages on failure. In particular, errors in nested
builders now report the enclosing class and field name, making them much
more useful.New features:
serialize field to @BuiltValueField. Use this to tag fields to skip
when serializing.wireName field to @BuiltValue and @BuiltValueField. Use this to
override the wire name for classes and fields when serializing.@BuiltValueEnum and @BuiltValueEnumConst annotations for specifying
settings for enums. Add wireName field to these to override the wire names
in enums when serializing.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.BuiltListAsyncDeserializer. It provides a way to deserialize large
responses without blocking, provided the top level serialized type is
BuiltList.Uri.Improvements:
Serializers in the same file.Fixes:
BuiltValueField, for configuring fields. First
setting available is compare. Set to false to ignore a particular field
for operator== and hashCode.const constructor.rebuild
method with covariant so the analyzer knows that, for example, a
CatBuilder cannot accept an Animal.build.dart and watch.dart as shown in the examples.build.dart and
watch.dart: replace the string GeneratorBuilder with PartBuilder.build 0.7.0 , build_runner 0.3.0, and build_test 0.4.0.Relax restriction on extends to allow for one special case: sharing of code between built_value and const classes. The base class in question must be
extends to allow for one special case: sharing of
code between built_value and const classes. The base class in question
must be abstract, have no fields, have no abstract getters and must not
implement operator==, hashCode or toString.Nothing published for this version
This release makes built_value actively block use in three unsupported ways. If you do need any of these to work, please file an issue and we'll look
This release makes built_value actively block use in three unsupported ways. If you do need any of these to work, please file an issue and we'll look into it.
extends is prohibited; use implements or extends Object with instead.package:built_value/built_value.dart with show or as is prohibited; this hides symbols from the generated code.built_value guarantees.Any problems please file an issue here: https://github.com/google/built_value.dart/issues
For classes using @BuiltValue(instantiate: false, you can now hand-code the builder. This allows you to customize the base builder.
For classes using @BuiltValue(instantiate: false, you can now hand-code the builder. This allows you to customize the base builder.
Add custom Error classes: BuiltValueNullFieldError, BuiltValueMissingGenericsError and BuiltValueNestedFieldError. These provide clearer error message
Error classes: BuiltValueNullFieldError, BuiltValueMissingGenericsError and BuiltValueNestedFieldError. These provide clearer error messages on failure. In particular, errors in nested builders now report the enclosing class and field name, making them much more useful.Allow quiver 27 and built_collection 3.
Allow quiver 27 and built_collection 3.
This will not affect anyone using the standard (pub) build.
This will not affect anyone using the standard (pub) build.
Add serialize field to @BuiltValueField. Use this to tag fields to skip when serializing.
New features:
serialize field to @BuiltValueField. Use this to tag fields to skip
when serializing.wireName field to @BuiltValue and @BuiltValueField. Use this to
override the wire name for classes and fields when serializing.@BuiltValueEnum and @BuiltValueEnumConst annotations for specifying
settings for enums. Add wireName field to these to override the wire names
in enums when serializing.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.BuiltListAsyncDeserializer. It provides a way to deserialize large
responses without blocking, provided the top level serialized type is
BuiltList.Uri.Improvements:
Serializers in the same file.Fixes:
Nothing published for this version
New annotation, BuiltValueField, for configuring fields. First setting available is compare. Set to false to ignore a particular field for operator==
BuiltValueField, for configuring fields. First
setting available is compare. Set to false to ignore a particular field
for operator== and hashCode.const constructor.The built_collection package now has separate interfaces and implementations, which changes the runtimeType of collection instances. Most people don't
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.
Nothing published for this version
v4.3.1 introduced a NPE when you have multiple levels of inheritance of interfaces; now fixed.
v4.3.1 introduced a NPE when you have multiple levels of inheritance of interfaces; now fixed.
Support implementing an interface and at the same time providing a mixin that implements part of the interface.
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.
Serialization now supports Int64 from package:fixnum.
Serialization now supports Int64 from package:fixnum.
Fixes some corner cases in generation.
Fixes some corner cases in generation.
One column per quarter.