FLUTTER ECOSYSTEM

flutter_simple_dependency_injection

A super simple dependency injection implementation for flutter that behaves like any normal IOC container and does not rely on mirrors

Latest version
2.0.0
30-day downloads
4.1K
Likes
74
Pub points
160

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

A lightweight dependency injection package for Flutter that provides a straightforward, mirror-free IOC container. It enables clean separation of concerns by allowing developers to register and resolve dependencies easily across the app. Designed for simplicity and performance, it avoids runtime reflection, making it suitable for production apps with tree-shaking support. The API is intuitive and integrates seamlessly into existing Flutter projects without complexity.

Use cases
  • Managing shared services across multiple widgets
  • Injecting repositories and data sources
  • Testing with mock dependencies
  • Simplifying initialization of complex object graphs
  • Enabling modular app architecture
Key features
  • Mirror-free dependency resolution
  • Simple registration and retrieval syntax
  • Supports singleton and transient instances
  • Works across all Flutter platforms
  • Lightweight and fast startup
Suitable for
  • Small to medium-sized Flutter applications
  • Teams seeking minimal setup for DI
  • Projects prioritizing performance and tree-shaking
  • Developers avoiding complex DI frameworks
Considerations
  • Limited advanced features compared to full DI containers
  • No built-in support for hierarchical scopes
  • Manual management of lifecycle in complex scenarios
  • Not ideal for very large-scale enterprise apps with intricate dependency trees
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add flutter_simple_dependency_injection

Categories

Source repository

Related projects