pure_di 0.0.4 copy "pure_di: ^0.0.4" to clipboard
pure_di: ^0.0.4 copied to clipboard

A lightweight, pure Dart dependency injection library with lazy singletons and scoped instances. Zero external dependencies.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add pure_di

With Flutter:

 $ flutter pub add pure_di

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  pure_di: ^0.0.4

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:pure_di/pure_di.dart';
0
likes
160
points
234
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight, pure Dart dependency injection library with lazy singletons and scoped instances. Zero external dependencies.

Repository (GitHub)
View/report issues

Topics

#dependency-injection #service-locator #singleton #scoped #di-flutter

Documentation

API reference

License

MIT (license)

More

Packages that depend on pure_di