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_generator

Code generator that creates GetIt registrations for the injectable library

pub.devRemove
ScoresHealth6774 (best)
Maintenance62 (best)57
Quality91 (best)73
Popularity5089 (best)
Community5280 (best)
Compatibility8585
UsageDownloads (30 days)143k579k (best)
Likes6137 (best)
Pub points140 / 160140 / 160
GitHub stars14625 (best)
MaintenanceLatest release1.2.1, 3 months ago (best)3.1.3, 3 months ago
Major versions in 12 months0 (best)1
Contributors351 (best)
Publisherdasralph.decodeness.ly
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyNoNo
KindPure DartPure Dart
Code generationYesYes
Direct dependencies1412 (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 and manual errors in service registration.
  • Supports advanced features such as private named parameters and multiple registrations.
  • Integrates with build_runner for fast incremental builds.
  • Provides type safety and compile‑time checks.
Weaknesses
  • Requires running build_runner after annotation changes
  • Generated code adds build artifacts to your project
  • Requires build_runner and a code‑generation step.
  • Only works with the injectable package; not a general DI solution.
  • Adds a dependency on the code‑generation tooling and can increase build times for very large projects.
WarningsNoneNone
inject_generator vs injectable_generator: which Flutter package should you use? | pubscout