# injectable

> Code generator that wires up get_it dependency injection in Dart and Flutter

Source: https://talira.ai/catalog/injectable-phy31322
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / dependency injection](https://talira.ai/categories/libraries/dependency-injection), [languages / dart](https://talira.ai/categories/languages/dart)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^1]
- Backed by: [Milad Akarie](https://talira.ai/orgs/milad-akarie.md)

injectable is a code generator for [get_it](https://talira.ai/catalog/get-it-dxvvp618.md), the Dart and Flutter service locator. You annotate classes with @injectable, @singleton or @lazySingleton, and injectable_generator writes the get_it registration code for them, so you don't register each dependency by hand. It handles asynchronous dependencies, factory parameters, binding abstract classes to implementations, environments, named instances, scopes and third-party types, and runs on build_runner or, experimentally, lean_builder. Its makers say it was inspired by Angular DI, Guice and inject.dart.

## Links

- GitHub: https://github.com/Milad-Akarie/injectable

## Problems it solves

- stop registering every dependency with get_it by hand in my Flutter app
- generate dependency injection code from annotations in Dart
- register different implementations for dev and production in a Flutter app

## Features

- generates get_it registration code from annotations
- singletons and lazy singletons, with dispose methods
- asynchronous injectables and pre-resolved futures
- factory parameters
- bind abstract classes to implementations
- register under different environments
- scopes and micro-packages
- build_runner or experimental lean_builder support

## Trust

Overall: 0.41 out of 1.
Signals: maintenance 0.45, adoption 0.56, momentum 0.28, community 0.72, backing 0.30, extensibility 0.00.

- last commit 3 months ago
- 626 GitHub stars
- 61 contributors
- backed by Milad Akarie

## Related

- Works with [get_it](https://talira.ai/catalog/get-it-dxvvp618.md)

## Alternatives

- [get_it](https://talira.ai/catalog/get-it-dxvvp618.md): A simple, fast service locator for Dart and Flutter

## Sources

[^1]: https://github.com/Milad-Akarie/injectable/blob/master/LICENSE (checked 29 Nov 2026)
