PackageTrack
Sign in Get early access

reflectable

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.

5.2.3 13K downloads/mo #2583 most downloaded on pub.dev google/reflectable.dart

What this package is like to depend on

Last release 3 months ago

26 May 2026

Release timing varies

gaps range from 8 days to 13 months

Nearly every release is documented

notes for 86 of 86 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

89 releases · first in 2015

9 releases in the last 12 months

see the full history below

Release timeline

89 releases · Jul 2015 to May 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 89
  1. 5.2.3 26 May 2026
    Release notes

    Released as reflectable version 5.2.3

    Open source →
    Release notes
    • Update dependency to use analyzer ^13.0.0.
    Open source →
  2. 5.2.2 19 May 2026
    Release notes

    Released as reflectable version 5.2.2

    Open source →
    Release notes
    • Update the language version to 3.12.
    Open source →
  3. 5.2.1 10 Feb 2026
    Release notes

    Released as version 5.2.1

    Open source →
    Release notes
    • Fix bugs #354 and #325.
    Open source →
  4. 5.2.0 02 Feb 2026
    Release notes

    Released as version 5.2.0

    Open source →
    Release notes
    • Upgrade reflectable to use analyzer ^10.0.0 and lints ^6.0.0.
    Open source →
  5. 5.1.0 09 Dec 2025
    Release notes
    • Upgrade reflectable to use version ^8.0.0 of the analyzer and version ^4.0.0 of build.
    Open source →
  6. 5.0.1 02 Oct 2025
    Release notes
    • Add an example that does not rely on code generation, basically just a recommendation to look at reflectable_builder for a real example.
    Open source →
  7. 5.0.0 29 Sep 2025
    Release notes
    • Breaking change: Split the code generator off of the package 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:.
    Open source →
  8. 4.0.15 04 Sep 2025
    Release notes
    • Use language version 3.9. In particular, use the 3.9 style of formatting.
    Open source →
  9. 4.0.14 29 Aug 2025
    Release notes
    • Use language version 3.7.
    • Migrate reflectable to use analyzer version ^7.0.0 (which removes the dependency on _macros, which doesn't exist any more).
    • This includes a small part of the migration work needed in order to use the new element model in the analyzer (Element2, for now).
    • Lots of reformatting (creates a big diff).
    Open source →
  10. 4.0.13 28 May 2025
    Release notes
    • Use language version 3.6.
    • Use newer versions of build_runner_core (^8.0.0) and dart_style (^3.0.0), to enable the new formatting style.
    • Ignore deprecated member use because build_runner is not yet ready for the new Element model.
    • Add support for suppression of warnings via environment variables. The environment variable has prefix REFLECTABLE_SUPPRESS_... and then UPPER_CASE of the WarningKind. For example, export REFLECTABLE_SUPPRESS_BAD_METADATA=yes will suppress the badMetadata warning.
    • Reformat the implementation to use the new style.
    • Introduce support for specifying the language version used by the formatter by setting REFLECTABLE_FORMATTER_LANGUAGE_VERSION to a value of the form [0-9]+\\.[0-9]+.
    • Added information to the design document in doc about the supported environment variables.
    Open source →
  11. 4.0.12 23 Oct 2024
    Release notes
    • 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 analyzer 6.11.0, but which are errors with 6.8.0.
    Open source →
  12. 4.0.11 22 Oct 2024
    Release notes
    • Fix bug 291 (such that metadata on enum values can be obtained).
    • Update dependencies to use analyzer 6.11.0 and lints 5.1.0.
    • Change the implementation to use ..._obvious_local_variable_types lints.
    • Update the [capability design document][1] slightly.
    Open source →
  13. 4.0.10 22 Aug 2024
    Release notes
    • Reintroduce support for newer versions of the analyzer (6.7.0 and up).
    Open source →
  14. 4.0.9 05 Jul 2024
    Release notes
    • 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 bound. Import the older library that does exist.
    Open source →
  15. 4.0.8 05 Jul 2024
    Release notes
    • Downgrade analyzer to 6.5.0, to avoid version conflict involving macros and _macros (that we can't do anything about from here).
    Open source →
  16. 4.0.7 05 Jul 2024
    Release notes
    • Update dependencies to use sdk 3.4.0 and analyzer 6.7.0.
    Open source →
  17. 4.0.6 07 Mar 2024
    Release notes
    • Update dependencies to use analyzer 6.4.0.
    Open source →
  18. 4.0.5 13 Feb 2023
    Release notes
    • 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.

    Open source →
  19. 4.0.4 08 Dec 2022
    Release notes
    • Resolve bug #300. Expressions of the form 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.
    Open source →
  20. 4.0.3 05 Dec 2022
    Release notes
    • Change code generation such that null safe programs do not give rise to a language version comment in the generated code. Previously, such programs would have // @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.
    Open source →
  21. 4.0.2 02 Nov 2022
    Release notes
    • Change handling of 'dart:...' libraries, to handle new behavior by 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.
    Open source →
  22. 4.0.1 26 Oct 2022
    Release notes
    • Update reflectable to use (and require) analyzer 5.2.0. This is a substantial update, because several analyzer members in the analyzer have been deprecated.
    Open source →
  23. 4.0.0 16 Sep 2022
    Release notes
    • Update reflectable to use (and require) analyzer 5.0.0. This is a substantial update, because several analyzer members in the analyzer have been deprecated, and some replacements have different return types.
    • 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., 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".
    Open source →
  24. 3.0.10 15 Sep 2022
    Release notes
    • Perform a minimal migration to use analyzer 4.6.0.
    Open source →
  25. 3.0.9 08 Jul 2022
    Release notes
    • Add support for checking whether a TypeMirror is reflecting on a nullable or non-nullable type.
    • Update dependencies to use analyzer ^4.2.0, lints ^2.0.0.
    Open source →
  26. 3.0.8 17 Mar 2022
    Release notes
    • Correct bug reported as #267 (null was generated in a case where the expression had to have type int).
    • Change code generation such that no invocations of generative constructors of enums are generated (such that it works with 'enhanced-enums').
    Open source →
  27. 3.0.7 22 Feb 2022
    Release notes
    • 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 recommended lints.
    Open source →
  28. 3.0.6 18 Feb 2022
    Release notes
    • 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-null value. Optimize several capability related getters by caching the result.
    Open source →
  29. 3.0.5 19 Jan 2022
    Release notes
    • Update reflectable to require analyzer ^3.0.0 (currently using 3.1.0), and to replace the package pedantic by the package lints.
    Open source →
  30. 3.0.4 17 Aug 2021
    Release notes
    • Fix the bug reported as #255.
    Open source →
  31. 3.0.3 29 Jul 2021
    Release notes
    • Update dependencies: analyzer: ^2.0.0
    • Fix issue #253.
    Open source →
  32. 3.0.2 06 May 2021
    Release notes
    • Migrate the code generator. The reflectable package is hereby fully migrated to null safety.
    • Update the following dependencies: build_config ^1.0.0, build_runner: ^2.0.1, build_runner_core: ^7.0.0.
    Open source →
  33. 3.0.1 22 Mar 2021
    Release notes
    • Use dart_style ^2.0.0.
    Open source →
  34. 3.0.0 16 Mar 2021
    Release notes
    • Support null safety in a stable version of reflectable.
    • Change minimum SDK constraint to 2.12.0.
    • Use 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.
    • Bug fix: Handle types of the form T* in some extra cases.
    Open source →
  35. 3.0.0-nullsafety.1 21 Jan 2021 pre-release
    Release notes
    • Enable analyzer version 0.41.2.
    • Change code generation to use new Resolver.astNodeFor method, eliminating the InconsistentAnalysisException workaround in most cases.
    • Prevent unnecessary code generation for inputs named *.vm_test.*, *.node_test.*, or *.browser_test.*, to reduce code generation time.
    Open source →
  36. 3.0.0-nullsafety.0 20 Jan 2021 pre-release
    Release notes
    • Migrate the generated code and its dependencies to null safety.
    • Remove bestEffortReflectedType, hasBestEffortReflectedType, deprecated since version 0.5.0.
    • Change the return type of ObjectMirror.delegate from dynamic to Object?, for consistency with several methods named invoke....
    Open source →
  37. 2.2.9 03 Dec 2020
    Release notes
    • Change build.yaml to ensure that 'lib/main.dart' will again be considered an entry point for code generation.
    • Update dependencies to include analyzer 0.40.5, 0.40.6, 0.41.0, 0.41.1.
    • Re-fixing issue #198, cf. google/built_value.dart issue #941.
    Open source →
  38. 2.2.8 08 Oct 2020
    Release notes
    • Update dependencies to include analyzer 0.40.4, with 0.40.3 as lower bound because of a breaking change.
    Open source →
  39. 2.2.7 07 Oct 2020
    Release notes
    • Update dependencies to support analyzers up to version 0.40.3.
    Open source →
  40. 2.2.6 28 Sep 2020
    Release notes
    • Resolve #198 (InconsistentAnalysisException), based on workaround from dart-lang/build#2634. Also widen the analyzer version constraint to include all 0.39 versions published at this point.
    Open source →
  41. 2.2.5 16 Jun 2020
    Release notes
    • Update dependencies. In particular, analyzer can now be 0.39.10. Handle issue with sync* functions, cf. issue #210.
    Open source →
  42. 2.2.4 27 Mar 2020
    Release notes
    • Eliminate dependency on package package_resolver (which is deprecated).
    Open source →
  43. 2.2.3 16 Mar 2020
    Release notes
    • Introduce support for the type void as a reified type.
    Open source →
  44. 2.2.2 16 Mar 2020
    Release notes
    • Generate code which will not cause implementation_imports diagnostics.
    Open source →
  45. 2.2.1 20 Dec 2019
    Release notes
    • Fix a bug concerned with the ordering of named parameters in a constructor declaration.
    • Update reflectable to use package analyzer version <0.40.0.
    • Ensure that generated code is lint free with package pedantic 1.9.0.
    • Make reflectable itself lint free with package pedantic 1.9.0.
    Open source →
  46. 2.2.1+1 14 Jan 2020
    Release notes
    • Restricting analyzer version to <= 0.39.3, because 0.39.3 contains a breaking change in the parameter list of a constructor.
    Open source →
  47. 2.2.1+2 21 Jan 2020
    Release notes
    • Update reflectable to work with analyzer 0.39.4.
    Open source →
  48. 2.2.0 22 Oct 2019
    Release notes
    • Adjust implementation to satisfy 'pedantic' lints. The generated code does this as well, except that some 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.
    Open source →
  49. 2.1.0 26 Jul 2019
    Release notes
    • 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 other packages), which addresses issue #173. See issue #180 about missing support for two features: This affects code in platform libraries (that is, libraries imported with 'dart:...' except 'dart:ui'). If a declaration in a platform library has metadata, a query for this metadata using 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.
    Open source →
  50. 2.0.12 10 May 2019
    Release notes
    • Follow-up bug fix related to #170: Corrected ParameterMirror.defaultValue for initializing formals.
    Open source →
  51. 2.0.11 03 May 2019
    Release notes
    • Bug fix #170: Default values for initializing formals are now included when generating function literals for newInstance.
    Open source →
  52. 2.0.10 15 Feb 2019
    Release notes
    • Updated dependency to allow using source_span 1.5.3.
    Open source →
  53. 2.0.10+1 26 Feb 2019
    Release notes
    • Lint fixes (e.g., T x; rather than T x = null;).
    Open source →
  54. 2.0.9 14 Jan 2019
    Release notes
    • Updated dependency to allow using analyzer 0.34.
    Open source →
  55. 2.0.8 30 Oct 2018
    Release notes
    • Fix version conflict #153: Updated version constraints on analyzer, build, build_runner, and test. Ported reflectable_builder.dart to work with new build API.
    Open source →
  56. 2.0.8+1 10 Jan 2019
    Release notes
    • Corrected the email address listed in pubspec.yaml for Dart Team.
    Open source →
  57. 2.0.7 17 Sep 2018
    Release notes
    • 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 is an import prefix from client code. We now strip off such prefixes (yielding prefix2.inject) in the cases reported in issue #132.
    Open source →
  58. 2.0.6 06 Sep 2018
    Release notes
    • Adjusts an implementation class (MixinApplication) such that a compile-time error occurring with analyzer 0.32.5 is avoided.
    Open source →
  59. 2.0.5 30 Aug 2018
    Release notes
    • 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.

    Open source →
  60. 2.0.4 22 Aug 2018
    Release notes
    • Null error bug fix.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive