Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributecobalt

Dependency injection for Dart and Flutter with scopes, async ordering, and tests.

pub.devRemove
injectable

Convenient code generator for get_it dependency injection.

pub.devRemove
ScoresHealth6478 (best)
Maintenance86 (best)45
Quality9797
Popularity1291 (best)
Community680 (best)
Compatibility100100
UsageDownloads (30 days)1.1k472k (best)
Likes51.5k (best)
Pub points160 / 160160 / 160
GitHub stars0625 (best)
MaintenanceLatest release1.9.2, 4 weeks ago (best)3.0.0, 7 months ago
Major versions in 12 months11
Contributors151 (best)
PublisherUnverifiedcodeness.ly
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationYesYes
Direct dependencies32 (best)
LicenseMITMIT
Setup effortLowMedium
JudgementStrengths
  • Deterministic teardown in reverse creation order
  • Topological sorting for async dependency startup
  • Optional code generation allowing manual and generated factories to mix
  • Reduces boilerplate associated with get_it registrations
  • Supports asynchronous initialization, singletons, factories, and factory parameters
  • Supports environments and named registrations
Weaknesses
  • Scopes dropped without dispose leak resources by design
  • Requires explicit teardown handling for third-party objects that do not implement Disposable
  • Requires running a code generator (build_runner or lean_builder)
  • Adds an extra build step during development
WarningsNoneNone
cobalt vs injectable: which Flutter package should you use? | pubscout