https://github.com/gbtb16/kiwi
A simple compile-time dependency injection library for Dart and Flutter
https://github.com/gbtb16/kiwi
dart dependency-injection flutter
Last synced: 29 days ago
JSON representation
A simple compile-time dependency injection library for Dart and Flutter
- Host: GitHub
- URL: https://github.com/gbtb16/kiwi
- Owner: gbtb16
- License: mit
- Created: 2018-09-01T16:36:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-25T01:29:52.000Z (about 2 months ago)
- Last Synced: 2025-04-14T18:16:10.160Z (29 days ago)
- Topics: dart, dependency-injection, flutter
- Language: Dart
- Homepage:
- Size: 429 KB
- Stars: 351
- Watchers: 9
- Forks: 52
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kiwi
[](https://github.com/gbtb16/kiwi/actions/workflows/kiwi.yml)
[](https://github.com/gbtb16/kiwi/actions/workflows/kiwi_generator.yml)
[](https://github.com/gbtb16/kiwi/actions/workflows/dart_kiwi_example.yml)
[](https://github.com/gbtb16/kiwi/actions/workflows/flutter_kiwi_example.yml)
A simple yet efficient IoC container for Dart and Flutter, coupled with a powerful generator to allow you to write less code.
The container does not rely on reflection, it's just a `Map`, so it's fast.
While using the generator, only constructor injection is supported.
## Kiwi
[](https://pub.dartlang.org/packages/kiwi)
[Source Code](https://github.com/gbtb16/kiwi/tree/master/packages/kiwi)
The core package providing the IoC container and the annotations which has no dependencies.
Import it into your pubspec `dependencies:` section.
## Kiwi Generator
[](https://pub.dartlang.org/packages/kiwi_generator)
[Source Code](https://github.com/gbtb16/kiwi/tree/master/packages/kiwi_generator)
The package providing the generator.
Import it into your pubspec `dev_dependencies:` section.
## Dart Kiwi Example
[Source Code](https://github.com/gbtb16/kiwi/tree/master/examples/dart_kiwi)
An example showing how to setup `kiwi` and `kiwi_generator` inside a Dart CLI project.
## Flutter Kiwi Example
[Source Code](https://github.com/gbtb16/kiwi/tree/master/examples/flutter_kiwi)
An example showing how to setup `kiwi` and `kiwi_generator` inside a Flutter project.
## Contributions
Feel free to contribute to this project.
If you find a bug or want a feature, but don't know how to fix/implement it, please fill an [issue](https://github.com/gbtb16/kiwi/issues).
If you fixed a bug or implemented a new feature, please send a [pull request](https://github.com/gbtb16/kiwi/pulls).