mobx_codegen
Code generator for MobX that adds support for annotating your code with @observable, @computed, @action and also creating Store classes.
2.7.8
65K downloads/mo
#1318 most downloaded on pub.dev
mobxjs/mobx.dart
What this package is like to depend on
Last release 3 days ago
21 Aug 2026
Ships fairly regularly
a new release about every 3 months
Most releases are documented
notes for 66 of 96 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
98 releases · first in 2019
6 releases in the last 12 months
see the full history below
Release timeline
98 releases · Jan 2019 to Aug 2026Releases
latest 60 of 98-
2.7.821 Aug 2026 -
2.7.728 Mar 2026Release notes
Open source →-
ignore deprecations
-
support analyzer 10
-
version
-
support v11 too, no affected changes
-
changelog
-
support v12
-
-
2.7.609 Jan 2026Release notes
Open source →- FEAT: Add support for analyzer 9.0.0 by migrating to the Element API (from deprecated Element2 API) (#1065)
- FEAT: require
analyzer: ^9.0.0(#1065)
2025-12-28
Changes
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
Release notes
Open source →- Add support for analyzer 9.0.0 by migrating to the Element API (from deprecated Element2 API)
- Require
analyzer: ^9.0.0(drop support for analyzer <9.0.0)
-
2.7.503 Jan 2026Release notes
Open source →-
Upgrading sdk and Analyzer fixes
-
FIX: fixing lints in tests.
-
FIX: package upgrades, analysis issue fixes.
-
FIX: error with code generation when file has unnamed extension (#1020).
-
FIX: make readonly work with computed (#710).
-
FIX: ObservableStream.listen() should also keep observable values updated (#708).
-
FEAT: add keepAlive to Computed (#976).
-
FEAT: support late observables (#973).
-
FEAT: Adds
useEquatablefor creating observables (#971). -
FEAT: require
analyzer: ^5.12.0(#934). -
FEAT: Adds custom
equalsfor creating observables. (#907). -
FEAT: Adds support for annotations (#904).
-
FEAT: Allow use custom context (#770).
2025-12-28
Changes
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
Release notes
Open source →-
Upgrading sdk and Analyzer fixes
-
FIX: fixing lints in tests.
-
FIX: package upgrades, analysis issue fixes.
-
FIX: error with code generation when file has unnamed extension (#1020).
-
FIX: make readonly work with computed (#710).
-
FIX: ObservableStream.listen() should also keep observable values updated (#708).
-
FEAT: add keepAlive to Computed (#976).
-
FEAT: support late observables (#973).
-
FEAT: Adds
useEquatablefor creating observables (#971). -
FEAT: require
analyzer: ^5.12.0(#934). -
FEAT: Adds custom
equalsfor creating observables. (#907). -
FEAT: Adds support for annotations (#904).
-
FEAT: Allow use custom context (#770).
-
-
2.7.420 Sep 2025Release notes
Open source →- Drop build_resolvers as a dependency, which enables support for build_runner 2.8.0
-
2.7.318 Sep 2025Release notes
Open source →-
Update some package versions including analyzer, and resolve deprecations
-
Run
melos run set_version -
Fix changelog version header
-
Widen supported analyzer versions, and revert deprecation fixes
Release notes
Open source →- Update analyzer version to
>=7.4.0 < 9.0.0 - Update source_gen version to
>=3.0.0 < 5.0.0 - Update build version to
>=3.0.0 < 5.0.0 - Update build_resolvers version to
>=3.0.0 < 5.0.0
-
-
2.7.214 Aug 2025Release notes
Open source →-
Update codegen to use new analyzer element2 API (>= 7.4.0), and update build_test to 3.3.0
-
Bump mobx_codegen version to 2.7.2
-
Replace deprecated call to TypeChecker.fromRuntime
Co-authored-by: Pavan Podila [email protected]
Release notes
Open source →- Update analyzer version to
>=7.4.0 < 8.0.0 - Update source_gen version to 3.0.0
- Update build version to 3.0.0
- Update build_resolvers version to 3.0.0
-
-
2.7.130 May 2025Release notes
Open source →- Update source_gen package version
FEAT: melos run command result
FIX: update analyzer version
FIX: removed in Dart 3.7 deprecated fields
FIX: golden tests
FIX: add dart_style in dev dependencies for consistent golden test results
FIX: add deprecated ignore comments for support current analyzer version- fix: analyzer version constraint in changelog
Co-authored-by: Mikhail Alenin - sunbro.marko [email protected]
Release notes
Open source →- Update source_gen package to 2.0.0
- Update analyzer version to
>=6.9.0 < 8.0.0
-
2.7.016 Dec 2024Release notes
Open source →- FIX: package upgrades, analysis issue fixes.
- FIX: error with code generation when file has unnamed extension (#1020).
- FIX: make readonly work with computed (#710).
- FIX: ObservableStream.listen() should also keep observable values updated (#708).
- FEAT: add keepAlive to Computed (#976).
- FEAT: support late observables (#973).
- FEAT: Adds
useEquatablefor creating observables (#971). - FEAT: require
analyzer: ^5.12.0(#934). - FEAT: Adds custom
equalsfor creating observables. (#907). - FEAT: Adds support for annotations (#904).
- FEAT: Allow use custom context (#770).
-
2.6.231 Oct 2024Release notes
Open source → -
2.6.128 Mar 2024 -
2.6.1+126 Oct 2024 -
2.6.027 Dec 2023Release notes
Open source →-
Upgrading sdk and Analyzer fixes
-
FIX: update observableAlwaysNotEqual function signature to accept nullable Object parameters.
-
FIX: package upgrades, analysis issue fixes.
-
FIX: Observable.value setter (covariant) (#993).
-
FIX: stacktrace in computed (#988).
-
FIX: observableset and observablemap notify all listeners when one is added with fireimmediately true (#962).
-
FIX: revert #784 (#842).
-
FIX: ObservableStream.listen() should also keep observable values updated (#708).
-
FIX: Widgets failed to call super.dispose() (#334).
-
FIX: issue 62 (#64).
-
FEAT: add scheduler option to autorun and reaction (#979).
-
FEAT: add keepAlive to Computed (#976).
-
FEAT: Adds
useEquatablefor creating observables (#971). -
FEAT: Adds custom
equalsfor creating observables. (#907). -
FEAT: Adds support for annotations (#904).
-
FEAT: Allow a custom equals parameter for ObservableStream (#771).
-
FEAT: Allow use custom context (#770).
2024-12-16
Changes
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
Release notes
Open source →- Add
keepAlivetoComputedto avoids suspending computed values when they are not being observed by anything.
-
-
2.6.0+104 Jan 2024 -
2.5.027 Dec 2023Release notes
Open source →- FIX: package upgrades, analysis issue fixes.
- FIX: Observable.value setter (covariant) (#993).
- FIX: stacktrace in computed (#988).
- FIX: observableset and observablemap notify all listeners when one is added with fireimmediately true (#962).
- FIX: revert #784 (#842).
- FIX: ObservableStream.listen() should also keep observable values updated (#708).
- FIX: Widgets failed to call super.dispose() (#334).
- FIX: issue 62 (#64).
- FEAT: add scheduler option to autorun and reaction (#979).
- FEAT: add keepAlive to Computed (#976).
- FEAT: Adds
useEquatablefor creating observables (#971). - FEAT: Adds custom
equalsfor creating observables. (#907). - FEAT: Adds support for annotations (#904).
- FEAT: Allow a custom equals parameter for ObservableStream (#771).
- FEAT: Allow use custom context (#770).
-
2.4.121 Dec 2023 -
2.4.019 Sep 2023Release notes
Open source →- Require
analyzer: ^5.12.0 - Support the latest package:analyzer
- Require Dart 3.0
- Require
-
2.3.009 May 2023Release notes
Open source →- REFACTOR: export
MultiReactionBuilderfromflutter_mobx.dart(#946). - FIX: package upgrades, analysis issue fixes.
- FIX: stacktrace in computed (#988).
- FIX: If builder of Observer errors, further error LateInitializationError: Local 'built' has not been initialized. will happen in addition to the actual error, reducing developer experience #780.
- FIX: Disable button Remove Completed, when the completed task is occult on screen. (#73).
- FEAT: add
MultiReactionBuilderwidget (#917).
- REFACTOR: export
-
2.2.014 Apr 2023Release notes
Open source →- Adds support for annotations
@protected,@visibleForTestingand@visibleForOverridingfor actions, observables futures and observables stream.
Release notes
Open source →Observeris updated with the newObserver.withBuiltChildconstructor, so you can exclude child branch from the re-rendering. - @subzero911
In case if you useObserver.withBuiltChild, you should provide two parameters:builderWithChildandchild:Observer.withBuiltChild( builderWithChild: (context, child) => FooWidget(foo: foo, bar: child), child: BarWidget(), // won't rebuild ),
- Adds support for annotations
-
2.1.118 Nov 2022Release notes
Open source →- refactor: export
MultiReactionBuilderfromflutter_mobx.dartby @amondnet
- refactor: export
-
2.1.014 Nov 2022 -
2.0.717 May 2022Release notes
Open source →- Update codegen templates to ignore newly recommended lint rules in generated code
-
2.0.7+118 Sep 2022 -
2.0.7+218 Sep 2022Release notes
Open source →- Moved the version into its own file (
version.dart) and exported from the main library file - Bringing the
version.dartfile in sync withpubspec.yaml
- Moved the version into its own file (
-
2.0.7+319 Sep 2022Nothing published for this version
-
2.0.622 Apr 2022 -
2.0.6+113 May 2022 -
2.0.6+214 May 2022 -
2.0.523 Dec 2021Release notes
Open source →- Fixed some tests not picking the right path for data files
- Package upgrades
- Adopting the recommended linting for Dart
Release notes
Open source →- Improve
debugFindConstructingStackFrameto let the message be less confusing to the reader - Allow disabling
No observables detected in the build method of Observer - The
analyzer: ^3.0.0in master branch is incompatible with Flutter stable - If
builderofObservererrors, further errorLateInitializationError: Local 'built' has not been initialized.will happen in addition to the actual error, reducing developer experience
-
2.0.5+123 Dec 2021 -
2.0.5+224 Dec 2021Nothing published for this version
-
2.0.407 Oct 2021Release notes
Open source →- Introducing a ReactionBuilder widget that helps you create an inline reaction and eliminates the need
to have a wrapper-
StatefulWidgetthat uses theinitStateto do the same. You can read more in the docs for ReactionBuilder.
- Introducing a ReactionBuilder widget that helps you create an inline reaction and eliminates the need
to have a wrapper-
-
2.0.307 Aug 2021Release notes
Open source →- Package upgrades
- Minor cleanups
- Adopting the recommended linting for Dart
-
2.0.225 Jul 2021 -
2.0.104 Apr 2021Release notes
Open source → -
2.0.1+204 Apr 2021Nothing published for this version
-
2.0.1+311 Apr 2021 -
2.0.001 Apr 2021 -
2.0.0-nullsafety.221 Mar 2021 pre-releaseNothing published for this version
-
2.0.0-nullsafety.121 Mar 2021 pre-releaseNothing published for this version
-
1.1.202 Nov 2020Release notes
Open source →- Fixing some analyzer errors related to deprecated types. Now using the
newer types as the analyzer package has been upgraded to
^0.39
- Fixing some analyzer errors related to deprecated types. Now using the
newer types as the analyzer package has been upgraded to
-
1.1.108 Oct 2020Release notes
Open source →- Upgraded our
analyzerdependency's to support a range from 0.39.1, up to latest 0.40.x in order to be compatible with other packages. - Formatting changes to improve pub.dev score
- Upgraded our
-
1.1.1+109 Oct 2020Nothing published for this version
-
1.1.1+227 Oct 2020Release notes
Open source →- Fixed a test related to typedef-ed identifiers with prefixes
- Fixed analyzer errors for the dev channel
-
1.1.1+327 Oct 2020Nothing published for this version
-
1.1.013 May 2020Release notes
Open source →- Added the ability to spy on changes happening inside MobX. You can now setup a
spy()to see all these changes. See this for an example. The changes inmobx_codegenhelp in the reporting of updates to observables. - Simplified the handling of tests and coverage. We are no longer dependent on the
test_coveragepackage, which was causing issues on CI. - Adding an ignore for the analyzer warning for
unnecessary_brace_in_string_interps - Syncing versions with pubspec.yaml
- Fixes a test that was not including an analyzer warning
Release notes
Open source →- Exceptions are reported more reliably with
FlutterError.reportError. This also includes the stack trace, as all caught exceptions are now wrapped insideMobXCaughtException. - Syncing versions with pubspec.yaml
- Added the ability to spy on changes happening inside MobX. You can now setup a
-
1.1.0+120 Jun 2020Nothing published for this version
-
1.1.0+228 Sep 2020 -
1.0.324 Mar 2020 -
1.0.213 Feb 2020Release notes
Open source →- Added automatic generation of
toStringmethod with@StoreConfigannotation
Thanks to @hawkbee1
- Added automatic generation of
-
1.0.128 Jan 2020Nothing published for this version
-
1.0.028 Jan 2020 -
0.4.225 Jan 2020Release notes
Open source →- Upgraded the
build_resolversdependency to 1.3.2, which fixes issues with certain versions of Dart being unable to resolvedart:uitypes.
- Upgraded the
-
0.4.117 Jan 2020Release notes
Open source →There were a number of bugs with the previous implementation of the
LibraryScopedNameFinder. This resolves them, as well as ensures that a single code path is followed whether or not the analyzed source code contains named imports, reducing the potential for future bugs.The following bugs have been corrected when using named imports:
- Missing type arguments on classes
- Missing type arguments on function typedefs
- Missing prefixes from imported typedefs
- Missing prefixes from implicit type argument bounds
-
0.4.1+123 Jan 2020Release notes
Open source →- README updates
- Switching to Github Actions for all builds and publishing
-
0.4.1+224 Jan 2020 -
0.4.004 Jan 2020Release notes
Open source →- Upgraded our
analyzerdependency's minimum version to 0.38.5 in order to workaround a bug where collection types would resolve to dynamic - Updated
pubspec.yamlto not include the reference to the@storeannotation. It has been removed.
- Upgraded our
-
0.4.0+104 Jan 2020Nothing published for this version
-
0.3.1303 Jan 2020Release notes
Open source →- Fixes the extraction of generic return-types which have nested generic type arguments, eg:
Future<List<User>> - Also fixes the issue reported in #367
- Fixes the extraction of generic return-types which have nested generic type arguments, eg:
-
0.3.1230 Dec 2019Release notes
Open source →- Removed the experimental use of
@storeannotation. It fails for some cases and has now been removed. We will explore other use cases with this annotation in future PRs. - Package updates
- Added the Flutter Favorite logo
- Removed the experimental use of