dart_ddi 0.8.1
dart_ddi: ^0.8.1 copied to clipboard
A Dependency Injection package, with Qualifier, Decorators, Interceptors, Events and more. Inspired by Java CDI and get_it.
0.8.1 #
- Fixed Dependent instances where
DDIInterceptor.onGetwas running beforePostConstructmixin.
0.8.0 #
-
Added support to register custom factories.
-
Added support to auto inject
Beansinto factories. -
Added support to get Factory
Beanswith custom parameters. -
Refactored how
FutureandFutureOris handled. -
Warnings:
- When registering a Factory Future and trying to obtain more than one instance simultaneously, it may cause a race condition and will be blocked. Especially if the instance is Application Scope.
- When using Interceptors and Factories, you must register your Factory with
ddi.register(factory: ScopeFactory.application(builder: ..., interceptors: [...]))
-
Break changes:
DDIInterceptor.aroundConstructrenamed toDDIInterceptor.onCreate.DDIInterceptor.aroundGetrenamed toDDIInterceptor.onGet.DDIInterceptor.aroundDisposerenamed toDDIInterceptor.onDispose.DDIInterceptor.aroundDestroyrenamed toDDIInterceptor.onDestroy.
0.7.2 #
- Fix Singleton and Object behavior when registering with the
registermethod.
0.7.1 #
- Added support for registering a custom factory class with the
registermethod. Note: Factories with parameters are not yet supported.
0.7.0 #
- Added
registerComponentandgetComponenttoDDI. Making Flutter Widgets components easier to reuse. - Added
DDIComponentInjectmixin. - Refactor
childrenbehavior. - Removed
setDebugModebehaviors. - Bump min dart sdk to 3.4.0
0.6.6 #
- Resolved issue with concurrent modification in events.
- Corrected events with
autoRuncapability, ensuring they can run infinitely as intended.
0.6.5 #
- Added
PackagesandProjectsinformation. - Updated example to make it simpler.
- Fixed and documented the Dependent Scope with dispose and destroy behavior.
0.6.3 #
- Added the ability to retrieve the last fired state from
DDIEventSenderandDDIStreamSender. - Added the ability to retrieve the
StreamControllerfromDDIStream. - Improved code quality.
0.6.2 #
- Fixed an issue when using await where registering, disposing, and destroying a bean.
0.6.1 #
- Fixed
EventLock,DDIEventSenderandDDIStreamSenderexport.
0.6.0 #
- Added support to register locked events.
- Added support for onError and onComplete callbacks on events.
- Added support for events with expiration duration.
- Added support to auto-run events.
- Added support for events with retry interval and maximum retries.
- Added support to filter events based on the value.
0.5.1 #
New Features #
- Introduced a shorthand variable
ddifor ease of use, replacing the need to useDDI.instance. - Added the capability to register children instances within module registrations.
- Added ability to enable or disable debugMode behavior.
- Included the
DDIControllermixin, providing a simplified approach to dependency injection usage.
Breaking Change #
- Removed the
injectvariable fromDDIModule, now usingddidirectly for more streamlined usage.
0.5.0 #
- Added support for Modules.
- Added Mixin DDIModule to help to use Modules behavior.
- Added Mixin PreDispose with execution before the class is disposed.
- Added methods isRegistered to Stream, Events and Beans instances.
- Future improvements.
0.4.0 #
- Added proper support for register and get Future instances.
0.3.1 #
- Fixed Documentation links.
- Some Futures instances behaviors fix.
0.3.0 #
- Migrating from flutter_test and flutter_lints to test and lints.
- Added support for Streams.
- Refactor Events behavior.
- Exceptions and code improvements.
0.2.0 #
- Added Mixin PostConstruct with execution after class construction.
- Added Mixin PreDestroy with execution before the class is destroyed.
- Added support for Events.
- Subscribe, unsubscribe and fire events.
- Conditional subscription.
- Asynchronous and Isolate events.
0.1.0 #
- Added a new
Object Scope. - Added the parameter
destroyable. - Renamed
qualifierNametoqualifier. - Removed the
Widget Scope, as it had the same behavior asDependent Scope. - Removed the
DDIContextextension and any Flutter dependecy. In the future there will be an extension with specific features for Flutter.
0.0.2 #
- Add app with example
- Folder structure
0.0.1 #
- Scopes: Singleton, Application, Dependent, Session and Widget.
- Support register, get, dispose and destroy.
- Qualifiers support.
- Decorators support.
- Interceptors support.
- Conditional register.
- Post Construct support.
- Circular Dependency Injection Detector (Experimental).