dependy 1.3.0 copy "dependy: ^1.3.0" to clipboard
dependy: ^1.3.0 copied to clipboard

Dependy is a lightweight and flexible dependency injection (DI) library for Dart. It simplifies the management of services and their dependencies.

Changelog #

1.3.0 #

Features #

  • Transient providers: Added transient parameter to DependyProvider. When true, a fresh instance is created on every resolution instead of caching a singleton.
  • Captive dependency detection: DependyModule now throws DependyCaptiveDependencyException at construction time if a singleton provider depends on a transient provider, preventing the silent capture of transient instances.

Infrastructure #

  • Migrated to Dart pub workspace (monorepo) structure.

1.2.0 #

Features #

  • EagerDependyModule:
    • Introduced the EagerDependyModule class for eager resolution of dependencies.
    • Users can convert a DependyModule into an EagerDependyModule

New Extension Method #

  • asEager():
    • Added an extension method on DependyModule that creates an instance of EagerDependyModule.

Code Example #


final dependyModule = DependyModule(providers: { /* providers here */
});

// Eagerly resolve all providers
final eagerModule = await
dependyModule.asEager
();

// Now you can call services directly
final myService = eagerModule<MyService>();

1.1.0 #

Features #

  • Asynchronous factories: Added support for resolving dependencies asynchronously.

1.0.2 #

Fixes #

  • Resolved Dart analyzer issues.
  • Corrected typos in README.md.

1.0.1 #

Improvements #

  • Added examples on pub.dev.
  • Provided detailed documentation for exceptions.

1.0.0 #

Initial Release #

  • Launch of the Dependy module system with basic functionality.
7
likes
0
points
243
downloads

Publisher

verified publisherxeinebiu.com

Weekly Downloads

Dependy is a lightweight and flexible dependency injection (DI) library for Dart. It simplifies the management of services and their dependencies.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on dependy