Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributeinject_generator

Source code generator for compile-time dependency injection using annotations.

pub.devRemove
lite_ref

A lightweight, no‑dependency DI library for Dart and Flutter.

pub.devRemove
ScoresHealth6784 (best)
Maintenance6299 (best)
Quality9197 (best)
Popularity5058 (best)
Community5252
Compatibility85100 (best)
UsageDownloads (30 days)143k (best)7.7k
Likes630 (best)
Pub points140 / 160160 / 160 (best)
GitHub stars1419 (best)
MaintenanceLatest release1.2.1, 3 months ago1.0.1, yesterday (best)
Major versions in 12 months0 (best)1
Contributors33
Publisherdasralph.denosy.dev
FitPlatformsAll (pure Dart)Android, iOS, Web, Windows, macOS, Linux
WASM-readyNoYes
KindPure DartFlutter widgets
Code generationYesNo
Direct dependencies142 (best)
LicenseMITMIT
Setup effortMediumLow
JudgementStrengths
  • Zero runtime overhead and no reflection (no dart:mirrors)
  • Compile-time validation catches missing bindings and cycles early
  • Strong Flutter integration via inject_flutter and ViewModelFactory
  • Zero external dependencies, keeping the app size small.
  • Fast lookups without hash‑maps.
  • Built‑in disposal for ChangeNotifier/Disposable objects.
  • Simple API that’s easy to learn.
Weaknesses
  • Requires running build_runner after annotation changes
  • Generated code adds build artifacts to your project
  • Limited feature set compared to more mature DI containers.
  • No code‑generation support for compile‑time safety.
  • Smaller community and fewer third‑party extensions.
WarningsNoneNone
inject_generator vs lite_ref: which Flutter package should you use? | pubscout