Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributedepend

Dependency management and service access via InheritedWidget.

pub.devRemove
injector

A simple to use and lightweight dependency injection library for Dart.

pub.devRemove
ScoresHealth73 (best)50
Maintenance90 (best)2
Quality100100
Popularity2684 (best)
Community41 (best)34
Compatibility100100
UsageDownloads (30 days)1.2k974k (best)
Likes1063 (best)
Pub points160 / 160160 / 160
GitHub stars775 (best)
MaintenanceLatest release5.2.0, 3 weeks ago (best)4.0.0, 2 years ago
Major versions in 12 months00
Contributors16 (best)
Publisherbangertstudio.kzUnverified
FitPlatformsAndroid, iOS, Web, Windows, macOS, LinuxAll (pure Dart)
WASM-readyYesYes
KindFlutter widgetsPure Dart
Code generationNoNo
Direct dependencies00
LicenseBSD-3-CLAUSEAPACHE-2.0
Setup effortLowLow
JudgementStrengths
  • Provides built-in lazy initialization via `LazyGet` and `LazyFutureGet` with support for disposal callbacks.
  • Manages container lifecycles tied to `DependencyScope` widgets.
  • Supports asynchronous initialization and custom error handling.
  • Simple and lightweight
  • Supports both dependencies (new instance each time) and singletons
  • Lazy loading of instances by default
Weaknesses
  • Relies on widget-tree placement rather than a decoupled global container.
  • Documentation and ecosystem are smaller compared to alternative DI solutions.
  • Requires absolute imports for dependencies to avoid issues
  • Does not handle complex dependency graphs automatically without manual wiring
WarningsNoneNone
depend vs injector: which Flutter package should you use? | pubscout