Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributeinjector

A simple to use and lightweight dependency injection library for Dart.

pub.devRemove
lite_ref

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

pub.devRemove
ScoresHealth5084 (best)
Maintenance299 (best)
Quality100 (best)97
Popularity84 (best)58
Community3452 (best)
Compatibility100100
UsageDownloads (30 days)976k (best)7.7k
Likes63 (best)30
Pub points160 / 160160 / 160
GitHub stars75 (best)19
MaintenanceLatest release4.0.0, 2 years ago1.0.1, yesterday (best)
Major versions in 12 months0 (best)1
Contributors6 (best)3
PublisherUnverifiednosy.dev
FitPlatformsAll (pure Dart)Android, iOS, Web, Windows, macOS, Linux
WASM-readyYesYes
KindPure DartFlutter widgets
Code generationNoNo
Direct dependencies0 (best)2
LicenseAPACHE-2.0MIT
Setup effortLowLow
JudgementStrengths
  • Simple and lightweight
  • Supports both dependencies (new instance each time) and singletons
  • Lazy loading of instances by default
  • 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 absolute imports for dependencies to avoid issues
  • Does not handle complex dependency graphs automatically without manual wiring
  • 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
injector vs lite_ref: which Flutter package should you use? | pubscout