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
injectable

Convenient code generator for get_it dependency injection.

pub.devRemove
ScoresHealth6778 (best)
Maintenance62 (best)45
Quality9197 (best)
Popularity5091 (best)
Community5280 (best)
Compatibility85100 (best)
UsageDownloads (30 days)143k470k (best)
Likes61.5k (best)
Pub points140 / 160160 / 160 (best)
GitHub stars14625 (best)
MaintenanceLatest release1.2.1, 3 months ago (best)3.0.0, 7 months ago
Major versions in 12 months0 (best)1
Contributors351 (best)
Publisherdasralph.decodeness.ly
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyNoYes
KindPure DartPure Dart
Code generationYesYes
Direct dependencies142 (best)
LicenseMITMIT
Setup effortMediumMedium
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
  • Reduces boilerplate associated with get_it registrations
  • Supports asynchronous initialization, singletons, factories, and factory parameters
  • Supports environments and named registrations
Weaknesses
  • Requires running build_runner after annotation changes
  • Generated code adds build artifacts to your project
  • Requires running a code generator (build_runner or lean_builder)
  • Adds an extra build step during development
WarningsNoneNone
inject_generator vs injectable: which Flutter package should you use? | pubscout