get_it
Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App"
9.2.1
1.9M downloads/mo
#262 most downloaded on pub.dev
flutter-it/get_it
What this package is like to depend on
Last release 6 months ago
20 Feb 2026
Release timing varies
gaps range from 8 days to 8 months
Most releases are documented
notes for 52 of 73 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
89 releases · first in 2018
11 releases in the last 12 months
see the full history below
Release timeline
89 releases · May 2018 to Feb 2026Releases
latest 60 of 89-
9.2.120 Feb 2026Release notes
Open source →- Added AI skill files in
skills/directory for AI coding assistants - Added AI-Assisted Development section to README
- Added AI skill files in
-
9.2.004 Dec 2025Release notes
Open source →- allReady() now caches its Future and returns the same instance on repeated calls
- Cache is invalidated when new async singletons are registered
- Pending async singletons complete their ready completer when removed via unregister() or scope reset
Release notes
Open source →allReady()now caches its Future and returns the same instance on repeated calls- Cache is automatically invalidated when new async singletons are registered
- This enables watch_it to detect when async registrations change (e.g., after
pushNewScope)
- Fixed: pending async singletons now complete their ready completer when removed via
unregister()or scope reset, allowingallReady()to complete properly
-
9.1.125 Nov 2025 -
9.1.020 Nov 2025Release notes
Open source →- Remove gradlew patterns from .gitignore and example/.gitignore to include scripts
- Add gradle-wrapper.jar to .pubignore to exclude binary from package
- Keeps gradle scripts for building example, excludes ~60KB binary
- Fixes pub publish warning about ignored files
Release notes
Open source →- Added DevTools extension for visualizing and inspecting GetIt registrations
- View all registered objects with their type, scope, registration mode, and state
- See instance details via
toString()output for created instances - Manual refresh button to update the registration list
- Requires
debugEventsEnabled = trueto be set on GetIt instance - See README for setup instructions
-
9.0.503 Nov 2025 -
9.0.403 Nov 2025 -
9.0.303 Nov 2025 -
9.0.203 Nov 2025 -
9.0.103 Nov 2025 -
9.0.003 Nov 2025Release notes
Open source →- BREAKING: Disposal order now always follows strict LIFO (Last-In-First-Out) based on registration order
- Previously, disposal order was based on the order objects appeared in internal hash maps, which was unpredictable when mixing named and unnamed registrations
- Now all disposals are sorted by
registrationNumber(a sequential counter assigned during registration) ensuring true LIFO order - The
strictDisposalOrderparameter has been removed fromreset(),resetScope(),popScope(),popScopesTill(), anddropScope()methods - Performance impact is minimal: ~8% overhead for 10,000 registrations (approximately 2-3ms), negligible for typical applications
- This change ensures correctness and predictability in dependency cleanup, which is more important than the minor performance cost
- Impact on existing apps: If your app's behavior relies on the previous imperfect reverse disposal order, there is likely a design issue in your dependency structure that should be addressed
- Fixed bug in
registerCachedFactoryParamAsyncwhere callinggetAsyncwould fail with null error because it was checking the wrong function parameter (synccreationFunctionParaminstead ofasyncCreationFunctionParam)
- BREAKING: Disposal order now always follows strict LIFO (Last-In-First-Out) based on registration order
-
8.3.002 Nov 2025Release notes
Open source →- Reduce from 704 to 192 lines following README_TEMPLATE.md
- Add prominent docs link to flutter-it.dev
- Emphasize construction set philosophy
- Remove Flutter Community banner (preparing for own logo)
- Update blog post URLs to new blog.burkharts.net domain
- Add startup orchestration article link
- Streamline Quick Start with simple 3-step example
- Link detailed content to documentation site
- Update footer with flutter_it slogan
-
8.2.002 Aug 2025Nothing published for this version
-
8.1.030 Jul 2025Nothing published for this version
-
8.0.313 Dec 2024Nothing published for this version
-
8.0.230 Oct 2024Nothing published for this version
-
8.0.121 Oct 2024Nothing published for this version
-
8.0.020 Sep 2024Nothing published for this version
-
8.0.0-pre-712 Aug 2024 pre-releaseRelease notes
Open source →- adding cachedFatories and better scope protection against race conditions
-
8.0.0-pre-611 Aug 2024 pre-release -
8.0.0-pre-525 Jun 2024 pre-release -
8.0.0-pre-403 Jun 2024 pre-releaseRelease notes
Open source →- fixing bug in
unregisterthat happened if you tried to unregister a named registration by providing an instance instead of the type and the instance name
- fixing bug in
-
8.0.0-pre-331 May 2024 pre-release -
8.0.0-pre-229 May 2024 pre-release -
8.0.0-pre-126 May 2024 pre-releaseRelease notes
Open source →getAll()andgetAllAsync()now have afromAllScopesparameter.- adding safeguards according to https://github.com/fluttercommunity/get_it/issues/364 to make it impossible to call
push/popScopewhile theinit()function of another pushScope is running. - fixed an unsafe type check when using a runtime type to access an object in get_it.
-
7.7.015 Apr 2024Release notes
Open source →- thanks to the PR by @kasefuchs https://github.com/fluttercommunity/get_it/pull/361
getAllis now available in an async version too.
- thanks to the PR by @kasefuchs https://github.com/fluttercommunity/get_it/pull/361
-
7.6.911 Apr 2024Release notes
Open source →- fig for bug that was introduced in 7.6.8 https://github.com/fluttercommunity/get_it/issues/358
-
7.6.803 Apr 2024Release notes
Open source →- merged PR by @venkata-reddy-dev https://github.com/fluttercommunity/get_it/pull/356 adding new
skipDoubleRegistrationflag for testing
- merged PR by @venkata-reddy-dev https://github.com/fluttercommunity/get_it/pull/356 adding new
-
7.6.718 Jan 2024Release notes
Open source →- merged PR by @subzero911 https://github.com/fluttercommunity/get_it/pull/330
-
7.6.606 Jan 2024Release notes
Open source →- Thanks to PR by @bvoq
getIt.reset, getIt.popScope, getIt.dropScopenow dispose registered objects in the reverse order in which they were registered.
- Thanks to PR by @bvoq
-
7.6.404 Sep 2023 -
7.6.304 Sep 2023 -
7.6.231 Aug 2023 -
7.6.131 Aug 2023Release notes
Open source →- added
isFinalscope parameter which fixes https://github.com/fluttercommunity/get_it/issues/326 - version bump of dependencies and updates readme
- added
-
7.6.1+131 Aug 2023Nothing published for this version
-
7.6.009 May 2023Release notes
Open source →- merged PR by lacopiroty https://github.com/fluttercommunity/get_it/pull/297 which now allows to access objects inside GetIt by runtime type too like
getIt.registerSingleton(TestClass()); final instance1 = getIt.get(type: TestClass); expect(instance1 is TestClass, true);- fix for https://github.com/fluttercommunity/get_it/issues/299
- fix for https://github.com/fluttercommunity/get_it/issues/300
-
7.5.007 May 2023Release notes
Open source →- new function
dropScope(scopeName)which allows to remove and dispose any named scope even if it's not the top one. Great PR by @olexale https://github.com/fluttercommunity/get_it/pull/292 which fixes sort of race conditions if you create scopes just for the life time of a widget.
- new function
-
7.4.105 May 2023Nothing published for this version
-
7.4.004 May 2023Nothing published for this version
-
7.3.024 Apr 2023Nothing published for this version
-
7.2.013 Jul 2021Nothing published for this version
-
7.1.415 Jun 2021Nothing published for this version
-
7.1.307 May 2021 -
7.1.206 May 2021Release notes
Open source →- Thanks to the clever PR https://github.com/fluttercommunity/get_it/pull/185 by @kmartins
unregisterandresetLazySingletonnow only have to be awaited if you use an async disposal function.
- Thanks to the clever PR https://github.com/fluttercommunity/get_it/pull/185 by @kmartins
-
7.1.105 May 2021Release notes
Open source →pushNewScope()now got an optionalinitparameter where you can pass a function that registers new objects inside the newly pushed Scope. Doing the registration in this function ensures that theonScopeChangedcall-back is called after the objects are registered.
-
7.1.005 May 2021Release notes
Open source →- The new
Disposableinterface had a typo that now got corrected. You could call this a breaking change but as the last version change is just three days old I guess not many people will be affected by this correction.
Getting notified when a scope change happens
When using scopes with objects that shadow other objects its important to give the UI a chance to rebuild and acquire references to the now active objects. For this you can register an call-back function in GetIt The getit_mixin has a matching
rebuiltOnScopeChangemethod./// Optional call-back that will get call whenever a change in the current scope happens /// This can be very helpful to update the UI in such a case to make sure it uses /// the correct Objects after a scope change void Function(bool pushed)? onScopeChanged; - The new
-
7.0.002 May 2021Release notes
Open source →This is a breaking change because there were some inconsistencies in the handling of the disposal functions that you can pass when registering an Object, pop a Scope or use
unregister()resetLazySingleton(). Some of accepted aFutureOrmethod type, others just avoidwhich meant you couldn't use async functions consistently. With this release you can use async functions in all disposal functions which unfortunately also required to change the signatures of the following functions:Future<void> reset({bool dispose = true}); Future<void> resetScope({bool dispose = true}); Future<void> popScope(); Future<bool> popScopesTill(String name); FutureOr resetLazySingleton<T extends Object>({ Object? instance, String? instanceName, FutureOr Function(T)? disposingFunction, }); FutureOr unregister<T extends Object>({ Object? instance, String? instanceName, FutureOr Function(T)? disposingFunction, });Basically all functions that can possibly call a disposal functions should be awaited.
Implementing the
DisposableinterfaceInstead of passing a disposing function on registration or when pushing a Scope from V7.0 on your objects
onDispose()method will be called if the object that you register implements theDisposable´interface:abstract class Disposable { FutureOr onDispose(); }Getting notified about the shadowing state of an object
In some cases it might be helpful to know if an Object gets shadowed by another one e.g. if it has some Stream subscriptions that it want to cancel before the shadowing object creates a new subscription. Also the other way round so that a shadowed Object gets notified when it's "active" again meaning when a shadowing object is removed.
For this a class had to implement the
ShadowChangeHandlersinterface:abstract class ShadowChangeHandlers { void onGetShadowed(Object shadowing); void onLeaveShadow(Object shadowing); }When the Object is shadowed its
onGetShadowed()method is called with the object that is shadowing it. When this object is removed from GetItonLeaveShadow()will be called.- Thanks to this PR https://github.com/fluttercommunity/get_it/pull/181 by @n3wtron you can now also make objects depend on other objects not only by type but also by type and name if you used a named registration
-
6.1.113 Apr 2021 -
6.1.012 Apr 2021Release notes
Open source →- Exceptions that occur during an async initialisation are now forwarded to the future that
allReady()returns instead to get swallowed https://github.com/fluttercommunity/get_it/issues/148 - Added a property
currentScopeNameto query the name of the currently active scope https://github.com/fluttercommunity/get_it/issues/153 popScopewill know throw an Exception instead just an assert if you are already on thebaseScopeand you try to pop it.
- Exceptions that occur during an async initialisation are now forwarded to the future that
-
6.0.015 Feb 2021 -
6.0.0-nullsafety.210 Jan 2021 pre-releaseNothing published for this version
-
6.0.0-nullsafety.130 Nov 2020 pre-releaseNothing published for this version
-
5.0.622 Jan 2021Nothing published for this version
-
5.0.522 Jan 2021Nothing published for this version
-
5.0.410 Jan 2021Nothing published for this version
-
5.0.309 Dec 2020Nothing published for this version
-
5.0.208 Dec 2020Release notes
Open source →- fixed https://github.com/fluttercommunity/get_it/issues/138 when calling
unRegisterthe dispose function that can be passed when registering wasn't called.
- fixed https://github.com/fluttercommunity/get_it/issues/138 when calling
-
5.0.123 Sep 2020 -
5.0.015 Sep 2020Release notes
Open source →- New scope support for registration
- optional dispose functions for registered objects
- Breaking change:
reset()now is async and returns aFuturebecause it will call the new optional disposal functions that can be async - Breaking change: If you use names to register your objects you now have to provide a type too or at least make sure the compiler can infer the type. With this change it is now possible to use the same name for different types.
-
5.0.0-mixin-version17 Sep 2020 pre-release -
5.0.0-alpha211 Sep 2020 pre-releaseNothing published for this version