built_value_generator
Value types with builders, Dart classes as enums, and serialization. This library is the dev dependency.
8.12.7
342K downloads/mo
#636 most downloaded on pub.dev
google/built_value.dart
What this package is like to depend on
Last release 19 days ago
05 Aug 2026
Ships fairly regularly
a new release about every 5 weeks
Most releases are documented
notes for 103 of 160 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
162 releases · first in 2015
9 releases in the last 12 months
see the full history below
Release timeline
162 releases · Oct 2015 to Aug 2026
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Releases
latest 60 of 162-
8.12.705 Aug 2026 -
8.12.630 Apr 2026 -
8.12.525 Mar 2026 -
8.12.420 Feb 2026Release notes
Open source →- Reduce use of dynamic calls in generated
operator==when there are functions: only use dynamic calls if the class also has type parameters.
- Reduce use of dynamic calls in generated
-
8.12.315 Jan 2026Release notes
Open source →- Require
analyzer ^10.0.0, stop using removed and deprecated methods from earlier versions.
- Require
-
8.12.213 Jan 2026 -
8.12.121 Nov 2025 -
8.12.005 Sep 2025Release notes
Open source →- Enable
build_runner 2.7.0"triggers" optimization. built_valuewill now only run in libraries that directly importpackage:built_value/built_value.dartor use an annotation called@SerializersFor. Other files will be quickly skipped and show inbuild_runneroutput as "not triggered" or "skipped".- If you need to run
built_valueon other source files, see https://pub.dev/packages/build_config#triggers for how to configure your own additional triggers forbuilt_value.
- Enable
-
8.11.204 Sep 2025Release notes
Open source →- Require
analyzer ^8.0.0. - Allow
built_value_generatorto usebuild 4.0.0. - Allow
built_value_generatorto usesource_gen 4.0.0.
- Require
-
8.11.106 Aug 2025 -
8.11.018 Jul 2025 -
8.11.0-dev08 Jul 2025 pre-release -
8.10.128 May 2025Release notes
Open source →- Add mutable collection serializers so
built_valuecan serializeList,SetandMap. 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.
- Add mutable collection serializers so
-
8.10.027 May 2025Release notes
Open source →- Stop generating unnecessary
newkeywords. - Stop generating explicit null checks in constructors: these are not needed with sound null safety.
- Stop generating checks for
dynamicin generics in constructors: accidental use ofdynamicis better avoided with lints than a runtime check.
- Stop generating unnecessary
-
8.9.506 Mar 2025 -
8.9.426 Feb 2025 -
8.9.318 Dec 2024Release notes
Open source →- Generate code that formats faster with current "short" style. Both versions are fast with the coming "tall" style.
- Mark
@nullabledeprecated: it does nothing and should not be used.
-
8.9.203 Apr 2024 -
8.9.119 Feb 2024 -
8.9.024 Jan 2024Release notes
Open source →- In
StandardJsonPlugin, add support for specifying types that should be left asList. - Allow non alphanumeric characters in
EnumClassnames.
- In
-
8.8.112 Dec 2023Release notes
Open source →- Fix codegen for enum wire keys when there is a
$in the field name. - Remove support for generating legacy (<2.12) Dart code.
- Fix codegen for enum wire keys when there is a
-
8.8.024 Nov 2023Release notes
Open source →- Allow classes with record fields to be serialized if they use a typedef for
the record type and install a custom
Serializerfor it.
- Allow classes with record fields to be serialized if they use a typedef for
the record type and install a custom
-
8.7.030 Oct 2023 -
8.6.321 Sep 2023 -
8.6.224 Aug 2023Release notes
Open source →- Remove JSON from
DeserializationErrormessage to prevent data accidentally leaking into logs. The JSON is still available on theDeserializationErrorobject. - Fix generation for fields that are
Functiontypes that are declared separately, for example in amixindefined in another source file, and use named or positional parameters.
- Remove JSON from
-
8.6.105 Jun 2023Release notes
Open source →- Fix support for generating enum mixins for Dart 3. Instead of triggering
mixin generation with
abstract class TestEnumMixin = Object with _$TestEnumMixinit must now be triggered withtypedef TestEnumMixin = _$TestEnumMixin.
- Fix support for generating enum mixins for Dart 3. Instead of triggering
mixin generation with
-
8.6.022 May 2023Release notes
Open source →- Add support for value types with record fields. Serialization with records is not yet supported.
- Fix generator failure due to top level record field.
- Migrate benchmark and examples to null safety.
- Remove pre-null-safe test cases.
- Remove analyzer plugin.
- Remove reference to
@nullableannotation from failure-to-instantiate message.
-
8.5.003 May 2023Release notes
Open source →- Add
Uint8ListSerializer. - Generate Dart-3-compatible code if needed.
- Stop using deprecated analyzer API.
- Fix codegen for optional fields with
$in the name.
- Add
-
8.4.403 Mar 2023Release notes
Open source →- Increase minimum version of
analyzer. - Fix generation with the type
Never.
- Increase minimum version of
-
8.4.311 Jan 2023Release notes
Open source →- Fix generated deserialization code when there is a manually written builder with nullable fields.
- Drop dev dependency on
quiver. - Disable all linting of generated code.
- Change generated hash code implementation so it formats better when there are many fields.
-
8.4.227 Oct 2022 -
8.4.119 Aug 2022 -
8.4.013 Jul 2022Release notes
Open source →- Fix custom builders in null safe code: allow nested builder fields to be nullable.
- Improve custom builders for null safe code: allow abstract setter/getter
pairs instead of fields. This allows nested builders to have a setter that
accepts
nulland a getter that guarantees not to returnnull, which is what auto instantiation of nested builders already provides. - Allow use of super field initialization in
EnumClass.
-
8.3.317 Jun 2022 -
8.3.224 May 2022 -
8.3.124 May 2022Release notes
Open source →- Fix generation support for optional generic bounds, e.g.
class Foo<T extends Object?>. - Fix generation for classes with names starting
$. - Ignore lint
unnecessary_lambdasin generated code.
- Fix generation support for optional generic bounds, e.g.
-
8.3.010 May 2022Release notes
Open source →- Change generated
buildmethods to return only public types, creating_buildmethods that return the generated impl types. This means dartdoc will no longer reference the generated types. - Ignore the
no_leading_underscores_for_local_identifierslint in generated code. - Migrated
built_value_generatorto null safety. This is purely an internal change, the generator can still generate legacy code as and when needed.
- Change generated
-
8.2.327 Apr 2022Release notes
Open source →- Bug fix: fix a corner case with generics that had incorrect serializer generation.
-
8.2.227 Apr 2022 -
8.2.126 Apr 2022 -
8.2.015 Apr 2022Release notes
Open source →- Allow writing final parameters in EnumClass constructor and valueOf method.
- Make generator output additional explicit null checks so the generated code complies with the
cast_nullable_to_non_nullablelint. - Bump version of
analyzer.
-
8.1.414 Jan 2022 -
8.1.328 Oct 2021 -
8.1.209 Aug 2021 -
8.1.109 Jul 2021Release notes
Open source →- Bug fix: allow constructors to have annotations. Previously, annotations would cause codegen to fail.
-
8.1.018 Jun 2021Release notes
Open source →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; setserializeNullsto 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_valueannotation 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.
- Add
-
8.0.606 May 2021 -
8.0.522 Apr 2021 -
8.0.422 Mar 2021 -
8.0.317 Mar 2021Release notes
Open source →- Fix error message for builder factory not installed.
- Bump version of
build.
-
8.0.209 Mar 2021 -
8.0.109 Mar 2021Release notes
Open source →- Update
chatexample to webdev. - Allow nulls when serializing/deserializing for better JSON interop.
- Fix generation bugs around enum wire name and polymorphism.
- Fix generation with generics for analysis with
strict-raw-types. - Add test coverage around generation for generic serialization.
- Add test coverage around initialization with generics.
- Update
-
8.0.009 Feb 2021Release notes
Open source →- Stable null safe release.
- Add
toJsonandfromJsonconvenience methods toSerializers.
-
8.0.0-nullsafety.019 Jan 2021 pre-releaseRelease notes
Open source →- Migrate to NNBD.
- Remove dependency on
package:quiver. - Remove support for serializing nulls using
BuiltValueSerializer(serializeNulls: true). - Make installed plugins public in
SerializersasserializerPlugins. @memoizedfields can now memoizenull; previously, nulls would not be cached, causing the computation to rerun.
-
7.1.126 Aug 2021Release notes
Open source →- Support analyzer
^0.40.0. - Workaround https://github.com/google/built_value.dart/issues/941.
- Support analyzer
-
7.1.023 Apr 2020Release notes
Open source →- Support private
Builtclasses. Note that private classes cannot be made serializable. - Support serializing enums to ints: add
wireNumberto@BuiltValueEnumConst. - Support memoizing
hashCode, so it's computed lazily once. Write an abstract getterint get hashCode;then annotate it with@memoizedto turn this on for abuilt_valueclass. - Trim
built_value_testdependencies: depend onmatcherinstead oftest. - Fix enum generator error messages when
valueandvalueOfare missing.
- Support private
-
7.0.907 Feb 2020Release notes
Open source →- Fix unescaped string usages while generating
ValueSourceClass. - Fix analyzer use: don't rely on
toStringon types.
- Fix unescaped string usages while generating
-
7.0.816 Jan 2020 -
7.0.716 Jan 2020Release notes
Open source →- Fix regression in a corner case when determining which fields to generate based on mixins.
- Tweak generation changes for
implicit-casts: falseandimplicit-dynamic: false. Relax casts again where possible.
-
7.0.615 Jan 2020Release notes
Open source →- Make generated code comply with analyzer option
strict-raw-types. - Allow
Serialiersdeclaration to comply withstrict-raw-types, or to continue to use raw types as before. - Make generated code comply with analyzer options
implicit-casts: falseandimplicit-dynamic: false.
- Make generated code comply with analyzer option