- Fixed Dependent instances where
DDIInterceptor.onGet
was running beforePostConstruct
mixin.
-
Added support to register custom factories.
-
Added support to auto inject
Beans
into factories. -
Added support to get Factory
Beans
with custom parameters. -
Refactored how
Future
andFutureOr
is 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.aroundConstruct
renamed toDDIInterceptor.onCreate
.DDIInterceptor.aroundGet
renamed toDDIInterceptor.onGet
.DDIInterceptor.aroundDispose
renamed toDDIInterceptor.onDispose
.DDIInterceptor.aroundDestroy
renamed toDDIInterceptor.onDestroy
.
- Fix Singleton and Object behavior when registering with the
register
method.
- Added support for registering a custom factory class with the
register
method. Note: Factories with parameters are not yet supported.
- Added
registerComponent
andgetComponent
toDDI
. Making Flutter Widgets components easier to reuse. - Added
DDIComponentInject
mixin. - Refactor
children
behavior. - Removed
setDebugMode
behaviors. - Bump min dart sdk to 3.4.0
- Resolved issue with concurrent modification in events.
- Corrected events with
autoRun
capability, ensuring they can run infinitely as intended.
- Added
Packages
andProjects
information. - Updated example to make it simpler.
- Fixed and documented the Dependent Scope with dispose and destroy behavior.
- Added the ability to retrieve the last fired state from
DDIEventSender
andDDIStreamSender
. - Added the ability to retrieve the
StreamController
fromDDIStream
. - Improved code quality.
- Fixed an issue when using await where registering, disposing, and destroying a bean.
- Fixed
EventLock
,DDIEventSender
andDDIStreamSender
export.
- 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.
- Introduced a shorthand variable
ddi
for 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
DDIController
mixin, providing a simplified approach to dependency injection usage.
- Removed the
inject
variable fromDDIModule
, now usingddi
directly for more streamlined usage.
- 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.
- Added proper support for register and get Future instances.
- Fixed Documentation links.
- Some Futures instances behaviors fix.
- Migrating from flutter_test and flutter_lints to test and lints.
- Added support for Streams.
- Refactor Events behavior.
- Exceptions and code improvements.
- 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.
- Added a new
Object Scope
. - Added the parameter
destroyable
. - Renamed
qualifierName
toqualifier
. - Removed the
Widget Scope
, as it had the same behavior asDependent Scope
. - Removed the
DDIContext
extension and any Flutter dependecy. In the future there will be an extension with specific features for Flutter.
- Add app with example
- Folder structure
- 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).