FLUTTER ECOSYSTEM

kiwi

A simple yet efficient dependency injection container for Dart and Flutter (can be coupled with the kiwi_generator package).

Latest version
5.0.1
30-day downloads
12.6K
Likes
173
Pub points
160

Package Overview

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

Overview

Kiwi is a lightweight and efficient dependency injection (DI) container for Dart and Flutter, designed to simplify the management of dependencies in applications. It allows developers to register and resolve dependencies with minimal boilerplate, supporting both manual and code-generated registration via the kiwi_generator package. Kiwi integrates seamlessly across all major platforms—Android, iOS, Web, macOS, Windows, and Linux—making it ideal for scalable, maintainable apps. Its simple API promotes clean architecture and testability by enabling easy mocking and replacement of dependencies.

Use cases
  • Managing service dependencies in large-scale Flutter apps
  • Simplifying unit and widget testing with mock dependencies
  • Enabling modular app architecture with clear separation of concerns
  • Supporting dependency lifecycle management
  • Integrating with state management solutions like Provider or Riverpod
  • Facilitating code generation for complex dependency graphs
Key features
  • Lightweight and fast DI container
  • Supports code generation via kiwi_generator
  • Platform-agnostic (works on all Flutter-supported platforms)
  • Easy integration with existing Flutter projects
  • Flexible dependency lifecycle control
  • Clean, readable syntax for dependency registration
Suitable for
  • Flutter developers seeking a simple DI solution
  • Teams building large, maintainable applications
  • Projects requiring robust testing strategies
  • Developers using code generation for improved performance
  • Apps targeting multiple platforms with shared logic
Considerations
  • Requires additional setup for code generation with kiwi_generator
  • May introduce overhead if overused in small projects
  • Learning curve for developers unfamiliar with DI patterns
  • Limited built-in features compared to full-featured DI frameworks
  • Best used in conjunction with other state management approaches
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add kiwi

Categories

Dependencies

Dependency list 1 items

Source repository

Related projects