Search packages, repositories and app categories

Package detailsv4.2.1

kiwi_generator

Generates dependency injection code using the kiwi package to reduce development time.

macOSWindowsLinux
30-day downloads
2.9K
Likes
13
Pub points
150

Install package

flutter pub add kiwi_generator

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Kiwi Generator is a code generation tool that automates dependency injection setup using the Kiwi package, significantly reducing boilerplate and development time. It generates clean, type-safe injection code based on annotations, enabling efficient management of dependencies in Flutter applications. By leveraging build-time code generation, it ensures performance and reduces runtime overhead. The generator integrates seamlessly with the Kiwi DI framework and supports cross-platform development across macOS, Windows, and Linux. Ideal for developers seeking streamlined dependency management without manual configuration.

Use cases

  • Automating dependency injection setup
  • Reducing boilerplate in large apps
  • Streamlining testable architecture
  • Enabling type-safe injections
  • Supporting scalable app structure

Key features

  • Build-time code generation
  • Annotation-based configuration
  • Type-safe dependency resolution
  • Seamless integration with Kiwi
  • Cross-platform support

Suitable for

  • Large-scale Flutter projects
  • Teams prioritizing maintainability
  • Developers using dependency injection
  • Apps requiring testable architecture
  • Projects aiming to reduce manual setup

Considerations

  • Requires understanding of Kiwi DI principles
  • Needs build_runner for code generation
  • May increase initial build time
  • Limited customization compared to manual DI
  • Dependent on Kiwi package version compatibility

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

kiwi

kiwi kiwi_generator dart_kiwi_example flutter_kiwi_example

Logo

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

Pub

Source Code

The core package providing the IoC container and the annotations which has no dependencies.

Import it into your pubspec dependencies: section.

Kiwi Generator

Pub

Source Code

The package providing the generator.

Import it into your pubspec dev_dependencies: section.

Dart Kiwi Example

Source Code

An example showing how to setup kiwi and kiwi_generator inside a Dart CLI project.

Flutter Kiwi Example

Source Code

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.
If you fixed a bug or implemented a new feature, please send a pull request.

Categories

Dependencies

Dependency list 9 items

Source repository

Projects using this package