just_di 1.0.0 copy "just_di: ^1.0.0" to clipboard
just_di: ^1.0.0 copied to clipboard

Lightweight, framework-agnostic dependency injection for Dart with scoped containers.

1.0.0 #

Initial stable release.

Added #

  • DiContainer — core dependency injection container with registerSingleton, registerLazySingleton, and registerFactory.
  • DiScope — child container created via DiContainer.createScope() for request, feature, or test isolation; inherits parent registrations via parent-chain resolution.
  • JustDi — global static facade backed by a shared DiContainer for app-level service registration.
  • Resolver interface — read-only contract exposing get<T>, getOrNull<T>, and isRegistered<T>.
  • Named instance support via the optional instanceName parameter on all registration and resolution methods.
  • override flag on all registration methods to allow explicit replacement of an existing registration.
  • Optional InstanceDisposer<T> callback on singleton and lazy-singleton registrations, called automatically on unregister, reset, and close.
  • unregister<T> — removes a single registration with optional disposal.
  • reset — removes all registrations from a container with optional disposal (in reverse registration order).
  • close — disposes and permanently seals a container or scope.
  • CircularDependencyException, DuplicateRegistrationException, and ServiceNotFoundException error types.
0
likes
150
points
8
downloads

Documentation

API reference

Publisher

verified publisherjustunknown.com

Weekly Downloads

Lightweight, framework-agnostic dependency injection for Dart with scoped containers.

Repository (GitHub)
View/report issues
Contributing

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on just_di