NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #682 most downloaded on pub.dev
Value types with builders, Dart classes as enums, and serialization. This library is the dev dependency.
Last release 1 months ago
02 Sep 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
163 releases · first in 2015
Make generated code comply with analyzer option strict-raw-types.
strict-raw-types.Serialiers declaration to comply with strict-raw-types, or to
continue to use raw types as before.implicit-casts: false
and implicit-dynamic: false.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.One column per quarter.
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.
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.
_finalizeBuilder generation so it uses the correct class name.Fix missing README.md in package:built_value.
README.md in package:built_value.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.
operator==, don't use dynamic.Breaking change: The "header" configuration on this builder is now ignored.
source_gen. This generator can now be used with other
generators that want to write to .g.dart files without a manual build
script.- 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.
BuiltSet with StandardJsonPlugin. It's serialized to
a JSON list.Iso8601DateTimeSerializer for use when you want ISO8601 serialization
instead of microseconds since epoch.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.
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 .
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).@SerializersFor annotation list
contains an undefined symbol.Fix internal use of deprecated SDK constants.
- Type fixes for 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 DateTime serialization; include microseconds. This is a breaking change to the JSON format.
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.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →