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
get_it

A fast, type-safe service locator for Dart and Flutter without BuildContext or code generation.

pub.devRemove
ScoresHealth6489 (best)
Maintenance86 (best)73
Quality97100 (best)
Popularity1298 (best)
Community680 (best)
Compatibility100100
UsageDownloads (30 days)1.1k2.6M (best)
Likes54.7k (best)
Pub points160 / 160160 / 160
GitHub stars01.5k (best)
MaintenanceLatest release1.9.2, 4 weeks ago (best)9.3.0, 2 months ago
Major versions in 12 months10 (best)
Contributors148 (best)
PublisherUnverifiedflutter-it.dev
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationYesYes
Direct dependencies33
LicenseMITMIT
Setup effortLowLow
JudgementStrengths
  • Deterministic teardown in reverse creation order
  • Topological sorting for async dependency startup
  • Optional code generation allowing manual and generated factories to mix
  • O(1) lookups using Dart maps with no code-generation overhead or build_runner steps
  • Rich lifecycle management including scopes, async initialization readiness (`allReady`), and LIFO disposal
  • Includes a dedicated DevTools extension to visually inspect registered objects
Weaknesses
  • Scopes dropped without dispose leak resources by design
  • Requires explicit teardown handling for third-party objects that do not implement Disposable
  • Relies on runtime resolution, meaning missing registrations fail at runtime rather than compile-time
  • Service locator pattern can obscure direct class dependencies if overused
WarningsNoneNone
cobalt vs get_it: which Flutter package should you use? | pubscout