Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributeinject_annotation

Constructor-based compile-time dependency injection framework for Dart and Flutter.

pub.devRemove
injectable

Convenient code generator for get_it dependency injection.

pub.devRemove
ScoresHealth7678 (best)
Maintenance62 (best)45
Quality100 (best)97
Popularity7091 (best)
Community5880 (best)
Compatibility100100
UsageDownloads (30 days)143k470k (best)
Likes221.5k (best)
Pub points160 / 160160 / 160
GitHub stars14625 (best)
MaintenanceLatest release1.2.1, 3 months ago (best)3.0.0, 7 months ago
Major versions in 12 months0 (best)1
Contributors451 (best)
Publisherdasralph.decodeness.ly
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationYesYes
Direct dependencies1 (best)2
LicenseMITMIT
Setup effortMediumMedium
JudgementStrengths
  • Compile-time validation catches wiring issues and cycles early
  • Zero runtime overhead and no reflection
  • Refactor-safe with strong Flutter and view model integration
  • 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 for code generation
  • Strictly enforces constructor injection
  • Requires running a code generator (build_runner or lean_builder)
  • Adds an extra build step during development
WarningsNoneNone
inject_annotation vs injectable: which Flutter package should you use? | pubscout