dependon 1.1.0 copy "dependon: ^1.1.0" to clipboard
dependon: ^1.1.0 copied to clipboard

Simple, light-weight and extremely legible package for dependency injection management.

Simple, light-weight and extremely legible package for dependency injection management.

Features #

  • Simple to use
  • Light-weight and high compatible
  • Keep your code legible

Getting started #

  1. Create your dependencies
import 'package:dependon/dependon.dart';

void main() {
  final Dependon di = Dependon.instance;
  di.enableLogging(true);

  di.singleton<UserRepository>(() => UserRepositoryImpl());
  di.factory(() => UserUseCase(get()));
  di.singleton(() => UserService(get()), lazy: false);

  runApp(myApp());
}
  1. Retrieve your dependencies
import 'package:dependon/dependon.dart';

final UserRepository userRepository = get<UserRepository>();
// or
final UserRepository userRepository = get();
// or
final userRepository = get<UserRepository>();
2
likes
160
points
27
downloads

Publisher

verified publisherniun.dev

Weekly Downloads

Simple, light-weight and extremely legible package for dependency injection management.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dependon