flutter_injections 1.3.0
flutter_injections: ^1.3.0 copied to clipboard
A lightweight dependency injection package for Flutter that enables context-free dependency management and modular architecture.
1.3.0 #
- New:
FlutterInjections.overrideForTesting(injections)andFlutterInjections.resetOverrides(). A module registers its injections on a level above everything before it, so a fake registered by a test around the module lost to the module's own; the overrides are looked up before every level. The fakes resolve their dependencies from the modules as usual. InjectExceptionandNotDisposeExceptionare exported frompackage:flutter_injections/flutter_injections.dart(they were only reachable throughsrc/).
1.2.0 #
- Bugfix: a module rebuilt by its parent (or by a hot reload) registered its
injections again on every rebuild. Each rebuild created new instances (a
lazySingletonwas built once per rebuild) and stacked a level that leaving the module never removed, so its injections kept resolving after it left the tree.FlutterInjectionsWidgetnow registers once, when it enters the tree, keeps the same instances while it is there, and removes exactly its own level when it leaves. - Breaking: the public
FlutterInjectionsWidget.instancefield is gone (the registry now lives in the widget'sState).FlutterInjectionsWidgethas aconstconstructor. - The package imports only
package:flutter/widgets.dart, not Material (deprecated in Flutter 3.50 in favour ofmaterial_ui).
1.1.2 #
- Documentation: write a short description about the package.
1.1.1 #
- Bugfix: when change module closed all injections
1.1.0 #
- Released stable version
- Add new widget FlutterModule
- Rename widget FlutterInjections to FlutterInjectionsWidget
- Create all tests
1.0.3-beta #
- Add contribuitors sections on reademe
1.0.2-beta #
- Update descriptions on Readme and Doc
1.0.1-beta #
- Fix Readme.md
1.0.0-beta #
- TODO: Initial version beta released.
- This package use search-tree to get the dependencies, this improve the velocity to get and use more less CPU to search the specific object.
- Provide you create a module injections, such as HomeInjections have all dependencies you to need on HomePage.
- Is easy to use, the focus is keep it simple to create a great application.
- Auto dispose when you remove the FlutterInjection on your Widget Tree.
- You can dispose a specific object using __dispose