Reactive caching and data-binding framework for Dart and Flutter
open sourceMITfree
Riverpod is a reactive caching and data-binding framework for Dart and Flutter; its name is an anagram of provider, an earlier package from the same author. Providers declare state and asynchronous work such as network requests, which recompute when their inputs change, and widgets watch them and switch on loading, data and error states, which Riverpod handles by default. It keeps logic out of the UI, makes it testable, and makes patterns like pull-to-refresh and search-as-you-type a few lines of code. Code generation with riverpod_generator, custom lint rules and refactorings catch common mistakes at compile time. It comes as riverpod for plain Dart, flutter_riverpod, and hooks_riverpod for use with Flutter Hooks.
Problems it solves
- manage state and network requests in a Flutter app
- show loading and error states for async data in Flutter without boilerplate
- make Flutter business logic testable outside the widgets
Features
- loading and error states handled by default
- providers that recompute when their dependencies change
- pull-to-refresh and search-as-you-type in a few lines
- code generation, custom lint rules and refactorings
- packages for Dart, Flutter and Flutter Hooks
Alternatives
The same job
These do what Riverpod does.
- Bloc Predictable state management for Dart and Flutter with the BLoC pattern
- GetX State management, dependency injection and routing for Flutter in one package
- provider InheritedWidgets, but simple
- June Flutter state management that feels like Flutter
- MobX.dart Reactive state management for Dart and Flutter, a port of MobX