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.

Just DI #

A lightweight, framework-agnostic dependency injection package for Dart and Flutter.

Features #

  • Global service registration
  • Singleton, lazy singleton, and factory support
  • Scoped overrides for tests and feature isolation
  • Explicit reset and disposal behavior

Quick Start #

import 'package:just_di/just_di.dart';

final api = ApiClient();
JustDi.registerSingleton<ApiClient>(api);

final scope = JustDi.createScope();
scope.registerLazySingleton<AuthService>(() => AuthService(scope.get<ApiClient>()));

final auth = scope.get<AuthService>();
scope.close();
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