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
Nothing published for this version
Allow analyzer 13.0.0 and analyzer 14.0.0
analyzer 13.0.0 and analyzer 14.0.0- Require analyzer 13.0.0.
analyzer 13.0.0.One column per quarter.
Allow analyzer 11.0.0 and analyzer 12.0.0.
analyzer 11.0.0 and analyzer 12.0.0.Reduce use of dynamic calls in generated operator== when there are functions: only use dynamic calls if the class also has type parameters.
operator== when there are
functions: only use dynamic calls if the class also has type parameters.Require analyzer ^10.0.0, stop using removed and deprecated methods from earlier versions.
analyzer ^10.0.0, stop using removed and deprecated methods from
earlier versions.- Allow analyzer 10.0.0.
analyzer 10.0.0.- Allow analyzer 9.0.0.
analyzer 9.0.0.Enable build_runner 2.7.0 "triggers" optimization.
build_runner 2.7.0 "triggers" optimization.built_value will now only run in libraries that directly import
package:built_value/built_value.dart or use an annotation called
@SerializersFor. Other files will be quickly skipped and show in
build_runner output as "not triggered" or "skipped".built_value on other source files, see
https://pub.dev/packages/build_config#triggers for how to configure your own
additional triggers for built_value.Allow built_value_generator to use build 4.0.0.
analyzer ^8.0.0.built_value_generator to use build 4.0.0.built_value_generator to use source_gen 4.0.0.Allow built_value_generator to use analyzer 8.0.0.
built_value_generator to use analyzer 8.0.0.- Use build ^3.0.0. - Use source_gen ^3.0.0.
build ^3.0.0.source_gen ^3.0.0.- Use build ^3.0.0-dev. - Use source_gen ^3.0.0-dev.
build ^3.0.0-dev.source_gen ^3.0.0-dev.Add mutable collection serializers so built_value can serialize List, Set and Map. It's still recommended to avoid mutable collections inside value ty
built_value can serialize List,
Set and Map. It's still recommended to avoid mutable collections inside
value types as they break hashing, comparison and caching; the intended use
case is that you have one top level mutable collection of your immutable
value types.Stop generating unnecessary new keywords.
new keywords.dynamic in generics in constructors: accidental
use of dynamic is better avoided with lints than a runtime check.Allow built_value_generator to use analyzer 7.0.0.
built_value_generator to use analyzer 7.0.0.Allow built_value_generator to use source_gen 2.0.0.
built_value_generator to use source_gen 2.0.0.Mark @nullable deprecated: it does nothing and should not be used.
@nullable deprecated: it does nothing and should not be used.Improve build performance when there are lots of built_value classes.
built_value classes.Fix for new warning about operator== param type.
operator== param type.In StandardJsonPlugin, add support for specifying types that should be left as List.
StandardJsonPlugin, add support for specifying types that should be left
as List.EnumClass names.Fix codegen for enum wire keys when there is a $ in the field name.
$ in the field name.Allow classes with record fields to be serialized if they use a typedef for the record type and install a custom Serializer for it.
Serializer for it.- Add Int32 serializer.
Int32 serializer.- Bump version of analyzer.
analyzer.Remove JSON from DeserializationError message to prevent data accidentally leaking into logs. The JSON is still available on the DeserializationError
DeserializationError message to prevent data accidentally
leaking into logs. The JSON is still available on the DeserializationError
object.Function types that are declared
separately, for example in a mixin defined in another source file, and use
named or positional parameters.Fix support for generating enum mixins for Dart 3. Instead of triggering mixin generation with abstract class TestEnumMixin = Object with _$TestEnumMi
abstract class TestEnumMixin = Object with _$TestEnumMixin it must now be triggered with typedef TestEnumMixin = _$TestEnumMixin.Add support for value types with record fields. Serialization with records is not yet supported.
@nullable annotation from failure-to-instantiate
message.Stop using deprecated analyzer API.
Uint8ListSerializer.$ in the name.Increase minimum version of analyzer.
analyzer.Never.Fix generated deserialization code when there is a manually written builder with nullable fields.
quiver.Prepare for breaking analyzer changes.
analyzer.- Bump version of analyzer.
analyzer.Fix custom builders in null safe code: allow nested builder fields to be nullable.
null and a getter that guarantees not to return null, which is
what auto instantiation of nested builders already provides.EnumClass.Fix erroneously generated null check for fields with generic bounds.
Migrate built_value_test to null safety.
built_value_test to null safety.Fix generation support for optional generic bounds, e.g. class Foo .
class Foo<T extends Object?>.$.unnecessary_lambdas in generated code.Change generated build methods to return only public types, creating _build methods that return the generated impl types. This means dartdoc will no l
build methods to return only public types, creating
_build methods that return the generated impl types. This means dartdoc
will no longer reference the generated types.no_leading_underscores_for_local_identifiers lint in generated
code.built_value_generator to null safety. This is purely an internal
change, the generator can still generate legacy code as and when needed.Bug fix: fix a corner case with generics that had incorrect serializer generation.
Bug fix: remove a print from the enum generator.
print from the enum generator.Fix deps: allow built_value_generator to use built_value 8.2.0.
built_value_generator to use built_value 8.2.0.Allow writing final parameters in EnumClass constructor and valueOf method.
cast_nullable_to_non_nullable lint.analyzer.- Bump version of analyzer.
analyzer.Bump version of analyzer, fix deprecation warnings.
analyzer, fix deprecation warnings.- Bump version of analyzer.
analyzer.Bug fix: allow constructors to have annotations. Previously, annotations would cause codegen to fail.
Add @BuiltValueHook annotation. It provides the same functionality as _initializeBuilder and _finalizeBuilder, but in a more visible way: annotate a s
New features:
@BuiltValueHook annotation. It provides the same functionality as
_initializeBuilder and _finalizeBuilder, but in a more visible way:
annotate a static method on the value class with @BuiltValueHook to
have it called on builder creation or finalization.serializeNulls to BuiltValueSerializer annotation. By default
generated serializers skip null fields instead of writing them; set
serializeNulls to write the nulls.New minor functionality:
JsonObject to be instantiated from a Map<dynamic, dynamic>.instantiable: false classes not nullable,
to match the implementations. Use autoCreateNestedBuilders: false to get
the old behaviour.built_value
annotation is used where it has no effect.Bug fixes:
nestedBuilders: false with instantiable: false.int.@SerializersFor is now an error,
instead of just generating nothing.Cleanup:
Bump versions of build_config and build_runner.
build_config and build_runner.- Bump version of analyzer.
analyzer.- Bump version of source_gen.
source_gen.Fix error message for builder factory not installed.
build.Bump versions of analyzer, quiver.
analyzer, quiver.Allow nulls when serializing/deserializing for better JSON interop.
chat example to webdev.strict-raw-types.Add toJson and fromJson convenience methods to Serializers.
toJson and fromJson convenience methods to Serializers.Remove dependency on package:quiver.
package:quiver.BuiltValueSerializer(serializeNulls: true).Serializers as serializerPlugins.@memoized fields can now memoize null; previously, nulls would not be
cached, causing the computation to rerun.Workaround https://github.com/google/built_value.dart/issues/941.
^0.40.0.Support private Built classes. Note that private classes cannot be made serializable.
Built classes. Note that private classes cannot be made
serializable.wireNumber to
@BuiltValueEnumConst.hashCode, so it's computed lazily once. Write an abstract
getter int get hashCode; then annotate it with @memoized to turn this on
for a built_value class.built_value_test dependencies: depend on matcher instead of test.value and valueOf are missing.Fix unescaped string usages while generating ValueSourceClass.
ValueSourceClass.toString on types.Fix analyzer lower bound: was 0.39.0, needs to be 0.39.3.
analyzer lower bound: was 0.39.0, needs to be 0.39.3.Fix regression in a corner case when determining which fields to generate based on mixins.
implicit-casts: false and
implicit-dynamic: false. Relax casts again where possible.Your coding agent can read these notes before it upgrades. Set up the MCP server →