finds.dev← search

// the find

rrousselGit/provider

★ 5,257 · Dart · MIT · updated Mar 2026

InheritedWidgets, but simple

Provider wraps Flutter's InheritedWidget system to make dependency injection and state management actually usable. It sits between raw InheritedWidgets (painful to write) and heavier solutions like Bloc or Riverpod. This is the package the Flutter team officially recommended for years, and it's still what most mid-sized Flutter codebases reach for first.

The API surface is small and maps directly onto Flutter concepts — if you understand ChangeNotifier and InheritedWidget, you already understand Provider. The Selector widget is genuinely well-designed: it lets you rebuild only the parts of the tree that depend on a specific slice of state, avoiding the blunt-instrument rebuilds that plague naive InheritedWidget usage. The DevTools extension (shipped in this same repo) is a real differentiator — you can inspect live provider state in the Flutter inspector without print debugging. Test coverage across the null_safe suite is thorough; the edge cases around dispose, listen:false, and context lookup are all exercised.

The author himself now recommends Riverpod over Provider, and that endorsement shift is visible in the commit cadence — last push was March 2026 but meaningful feature work effectively stopped years ago. Provider has a known footgun: calling context.read() inside build() instead of context.watch() silently breaks reactivity, and there's no static analysis to catch it. ProxyProvider combinators (ProxyProvider2, ProxyProvider3…) are syntactically ugly and don't scale past three dependencies without becoming hard to read. There's no built-in async state handling beyond FutureProvider/StreamProvider, which lack loading/error granularity that most real apps need.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →