NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #2629 most downloaded on pub.dev
Reflection support based on code generation, using 'capabilities' to specify which operations to support, on which objects. This is the run-time part of reflectable.
Last release 4 months ago
26 May 2026
Release timing varies
gaps range from 8 days to 13 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
89 releases · first in 2015
Released as reflectable version 5.2.3
Released as reflectable version 5.2.3
Released as reflectable version 5.2.2
Released as reflectable version 5.2.2
One column per quarter.
Released as version 5.2.1
Released as version 5.2.0
Released as version 5.2.0
Upgrade reflectable to use version ^8.0.0 of the analyzer and version ^4.0.0 of build.
Add an example that does not rely on code generation, basically just a recommendation to look at reflectable_builder for a real example.
reflectable_builder for a real example.Breaking change: Split the code generator off of the package reflectable. This code generator must henceforth be obtained from the package reflectable…
reflectable. This code generator must henceforth be obtained from
the package reflectable_builder. The point is that this can be a
dev_dependency. This also implies that build.yaml must specify
the reflectable code generator as reflectable_builder:
rather than just reflectable:.Use language version 3.9. In particular, use the 3.9 style of formatting.
Migrate reflectable to use analyzer version ^7.0.0 (which removes the dependency on _macros, which doesn't exist any more).
_macros, which doesn't exist any more).Element2, for now).Ignore deprecated member use because build_runner is not yet ready for the new Element model.
build_runner_core (^8.0.0) and dart_style
(^3.0.0), to enable the new formatting style.build_runner is not yet
ready for the new Element model.REFLECTABLE_SUPPRESS_... and
then UPPER_CASE of the WarningKind. For example,
export REFLECTABLE_SUPPRESS_BAD_METADATA=yes will suppress
the badMetadata warning.REFLECTABLE_FORMATTER_LANGUAGE_VERSION to
a value of the form [0-9]+\\.[0-9]+.doc about the supported
environment variables.Revert analyzer dependency to 6.8.0 and lints to 5.0.0 due to macro related version resolution conflict. Undo some changes that are required for analy
Fix bug 291 (such that metadata on enum values can be obtained).
..._obvious_local_variable_types
lints.Reintroduce support for newer versions of the analyzer (6.7.0 and up).
Lower the upper bound for the analyzer to avoid a complaint that we should import a library that doesn't exist with the analyzer when using the lower
Downgrade analyzer to 6.5.0, to avoid version conflict involving macros and _macros (that we can't do anything about from here).
macros and _macros (that we can't do anything about from here).Update dependencies to use sdk 3.4.0 and analyzer 6.7.0.
Update dependencies to use analyzer 6.4.0.
This should be helpful in situations where the Uri is used to find the actual file. This is technically a breaking change, but we do not consider it t…
Remove legacy tests (they cannot be executed when using a version of Dart which will be released soon).
Use an upper bound of 4.0.0 for the SDK constraint, preparing for said release.
Change the computation of the Uri of a library mirror such that it is taken
from the AssetId of the library, when possible. This should be helpful in
situations where the Uri is used to find the actual file. This is technically
a breaking change, but we do not consider it to be a breaking change in
practice, because the Uri's provided in previous versions were essentially
meaningless strings. They were just known to be distinct for distinct
libraries, and that property also holds with this change.
For documentation about how these URIs are generated, please see https://pub.dev/documentation/build/latest/build/AssetId/uri.html and https://pub.dev/documentation/build/latest/build/AssetId-class.html .
For documentation about package URIs, please see
https://api.dart.dev/stable/2.19.2/dart-isolate/Isolate/packageConfig.html
and, for example, https://pub.dev/packages/package_config.
Resolve bug #300. Expressions of the form f denoting a generic instantiation of a function (that is: the result of passing the type argument T to the
f<T> denoting a generic
instantiation of a function (that is: the result of passing the type
argument T to the generic function f, yielding a non-generic
function) was not supported; this version supports it.Change code generation such that null safe programs do not give rise to a language version comment in the generated code. Previously, such programs wo
// @dart = 2.12 in the generated library, but
this causes newer features to be unavailable in the generated code.
As before, programs which are not fully null safe will have a
generated library that contains // @dart = 2.9.Change handling of 'dart:...' libraries, to handle new behavior by build_resolvers 2.1.0: 'dart:html' wasn't reported before by resolver.libraries, bu
build_resolvers 2.1.0: 'dart:html' wasn't reported before by
resolver.libraries, but is now included. To preserve existing
behavior (and avoid generating code that imports 'dart:html'), this
update removes 'dart:html' from the set of libraries that are
considered "importable" by generated code.This is a substantial update, because several analyzer members in the analyzer have been deprecated.
Breaking change: The analyzer now reports that the 'mixin' of a 'mixin application class' (e.g., class B = A with M1, M2;) is the class itself (i.e.,…
class B = A with M1, M2;) is the class
itself (i.e., B), and the last mixin (M2) is obtained as
mirror.superclass.mixin. Previously the same mixin would be obtained with
mirror.mixin. This is actually a more faithful model than the one used
previously, so the new behavior is also used by reflectable. (In particular,
if we have class B2 = A with M1, M2; then B == B2 is not true, which
implies that the mixin application class works like a regular class
declaration with an empty body, e.g., class B = A with M1, M2; works like
class B extends A with M1, M2 {}, where mirror.superclass.mixin is
the natural way to obtain a mirror of M2). This is a breaking change,
but it only affects usages where there is a dependency on the exact
superclass structure, and it seems likely that this only happens rarely:
we may well traverse all supertypes or all superclasses, but we are not
likely to do things like "go to the 5th superclass, find the mixin, and
check that it has a foo method".Perform a minimal migration to use analyzer 4.6.0.
Add support for checking whether a TypeMirror is reflecting on a nullable or non-nullable type.
TypeMirror is reflecting on a
nullable or non-nullable type.Correct bug reported as #267 (null was generated in a case where the expression had to have type int).
null was generated in a case where the
expression had to have type int).Change analysis_options.yaml such that we get the same linting locally and on pub.dev. Update many libraries and tests to conform to the currently rec
analysis_options.yaml such that we get the same linting locally
and on pub.dev. Update many libraries and tests to conform to the currently
recommended lints.Update reflectable to require analyzer ^3.2.0; adjust several locations in the code where null is handled, but analyzer methods will now return a non-
Update reflectable to require analyzer ^3.0.0 (currently using 3.1.0), and to replace the package pedantic by the package lints.
pedantic by the package lints.* Fix the bug reported as #255.
Update dependencies: analyzer: ^2.0.0
Migrate the code generator. The reflectable package is hereby fully migrated to null safety.
build_config ^1.0.0,
build_runner: ^2.0.1, build_runner_core: ^7.0.0.* Use dart_style ^2.0.0.
dart_style ^2.0.0.Support null safety in a stable version of reflectable.
analyzer ^1.1.0; build ^2.0.0; build_resolvers ^2.0.0; glob ^2.0.0;
logging ^1.0.0; package_config ^2.0.0.T* in some extra cases.Enable analyzer version 0.41.2.
Resolver.astNodeFor method, eliminating
the InconsistentAnalysisException workaround in most cases.*.vm_test.*,
*.node_test.*, or *.browser_test.*, to reduce code generation time.Remove bestEffortReflectedType, hasBestEffortReflectedType, deprecated since version 0.5.0.
bestEffortReflectedType, hasBestEffortReflectedType,
deprecated since version 0.5.0.ObjectMirror.delegate from dynamic to
Object?, for consistency with several methods named invoke....Change build.yaml to ensure that 'lib/main.dart' will again be considered an entry point for code generation.
build.yaml to ensure that 'lib/main.dart' will again be considered
an entry point for code generation.google/built_value.dart issue #941.Update dependencies to include analyzer 0.40.4, with 0.40.3 as lower bound because of a breaking change.
Update dependencies to support analyzers up to version 0.40.3.
Resolve #198 (InconsistentAnalysisException), based on workaround from dart-lang/build#2634. Also widen the analyzer version constraint to include all
Update dependencies. In particular, analyzer can now be 0.39.10. Handle issue with sync* functions, cf. issue #210.
sync* functions, cf. issue #210.Eliminate dependency on package package_resolver (which is deprecated).
package_resolver (which is deprecated).Introduce support for the type void as a reified type.
void as a reified type.Generate code which will not cause implementation_imports diagnostics.
implementation_imports diagnostics.Restricting analyzer version to <= 0.39.3, because 0.39.3 contains a breaking change in the parameter list of a constructor.
Update reflectable to work with analyzer 0.39.4.
Fix a bug concerned with the ordering of named parameters in a constructor declaration.
<0.40.0.Adjust implementation to satisfy 'pedantic' lints. The generated code does this as well, except that some const modifiers are generated even though th
const modifiers are generated even
though they could be omitted (an // ignore_for_file comment is generated
such that the linter does not complain about this). Upgrade dependencies
to allow using analyzer 0.38.5, and current versions of many other packages.Code generator rewritten in order to work with changes in the analyzer APIs, enabling the use of analyzer version 0.37.0 (and newer versions of many o
DeclarationMirror.metadata will return null. Also, if a constructor
in a platform library has a parameter with a default value, and that
parameter is omitted in a reflective invocation, the value passed will be
null rather than the declared value. This is a bug, but it is blocked on
getting access to AST nodes in platform libraries from the resolver provided
by build.Follow-up bug fix related to #170: Corrected ParameterMirror.defaultValue for initializing formals.
ParameterMirror.defaultValue
for initializing formals.Bug fix #170: Default values for initializing formals are now included when generating function literals for newInstance.
newInstance.Lint fixes (e.g., T x; rather than T x = null;).
T x; rather than T x = null;).Updated dependency to allow using source_span 1.5.3.
Updated dependency to allow using analyzer 0.34.
Corrected the email address listed in pubspec.yaml for Dart Team.
pubspec.yaml for Dart Team.Fix version conflict #153: Updated version constraints on analyzer, build, build_runner, and test. Ported reflectable_builder.dart to work with new bu
Bug fix #132: We used to generate terms like prefix2.di.inject in order to denote a top level declaration named inject, but that's an error because di
prefix2.di.inject in order
to denote a top level declaration named inject, but that's an error
because di is an import prefix from client code. We now strip off such
prefixes (yielding prefix2.inject) in the cases reported in issue #132.Adjusts an implementation class (MixinApplication) such that a compile-time error occurring with analyzer 0.32.5 is avoided.
MixinApplication) such that a
compile-time error occurring with analyzer 0.32.5 is avoided.Enhancement of the support for reflection on type arguments, covering cases where a type annotation is a parameterized type where all type arguments a
Enhancement of the support for reflection on type arguments, covering
cases where a type annotation is a parameterized type where all type
arguments are resolved statically (e.g., List<int> f();). We (still) do
not support cases where one or more type arguments are or contain
type variables from an enclosing function or class (like the type of
the formal parameter to List.addAll: List<E>), and with such type
arguments a dynamic error is raised if an attempt is made to access it.
Similarly, we (still) do not support extracting the value of the actual
type arguments for an instance of a generic class (e.g., for a given
list, we cannot obtain the precise value of the actual type argument;
we can test things like myList is List<num> and myList is List<String>
without reflection at all, but that only reveals an upper bound, not
the precise value of the type argument, and we cannot get that precise
value without support for some additional primitives).
The build.yaml file in reflectable was adjusted such that a much larger
set of files are included for code generation. This means that we will
err on the side of generating code for too many files rather than too few,
but this choice seems to be more user-friendly. Developers who get
irritated about seeing warnings like "This reflector does not match
anything" (which is a likely outcome for code generation applied to some
arbitrary library which is not an entry point) can then add a
build.yaml file specifying more precisely which libraries to generate
code for.
* Null error bug fix.
Your coding agent can read these notes before it upgrades. Set up the MCP server →