Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Black Lives Matter

Black Lives Matter. Support the Equal Justice Initiative.

Welcome to Riverpod!

This project can be considered as an experimental provider rewrite.

For learning how to use Riverpod, see its documentation: https://riverpod.dev

Long story short:

See the FAQ if you have questions around what this means for provider.

Index

Motivation

If provider is a simplification of InheritedWidgets, then Riverpod is a reimplementation of InheritedWidgets from scratch.

It is very similar to provider in principle, but also has major differences as an attempt to fix the common problems that provider face.

Riverpod has multiple goals. First, it inherits the goals of provider:

From there, Riverpod goes a few steps beyond:

These are achieved by no longer using InheritedWidgets. Instead, Riverpod implements its own mechanism that works in a similar fashion.

For learning how to use Riverpod, see its documentation: https://riverpod.dev

Contributing

Contributions are welcomed!

Here is a curated list of how you can help:

FAQ

Why another project when provider already exists?

While provider is largely used and well accepted by the community, it is not perfect either.

People regularly file issues or ask questions about some problems they face, such as:

These are legitimate problems, and I believe that something can be improved to fix those.

The issue is, these problems are deeply rooted in how provider works, and fixing those problems is likely impossible without drastic changes to the mechanism of provider.

In a way, if provider is a candle then Riverpod is a lightbulb. They have very similar usages, but we cannot create a lightbulb by improving our candle.

Is it safe to use in production?

The project is still experimental, so use it at your own risk.

It applied all the lessons learned from provider, so I would expect this project to solve most use-cases.
But if your project randomly catches fire, you were warned!

Will this get merged with provider at some point?

No. At least not until it is proven that the community likes Riverpod and that it doesn’t cause more problems than it solves.

While provider and this project have a lot in common, they do have some major differences. Differences big enough that it would be a large breaking change for users of provider to migrate Riverpod.

Considering that, separating both projects initially sounds like a better compromise.

Will provider be deprecated/stop being supported?

Not in the short term, no.

This project is still experimental and unpopular. While it is, in a way, a provider 2.0, its worth has yet to be proven.

Until it is certain that Riverpod is a better way of doing things and that the community likes it, provider will still be maintained.

Download source code on GitHub

https://github.com/rrousselGit/provider

Exit mobile version