What is better, Riverpod or Provider for Flutter state management solution?

Malisha Tharindu
2 min readMay 13, 2022

--

Provider package is certainly a great tool, however, Riverpod has extended its capacity.

However, flutter creators still recommend Provider as the stable state management mechanism at the time of writing this post.

By the way provider has some limitations but Riverpod has overcome those limitations. As well Riverpod is fast, reliable, perfect.

Below are the my facts for why you should choose Riverpod:

  1. Riverpod is flutter independent as we can achieve the above mentioned features by not using InheritedWidgtes any more. Riverpod implements its own mechanism. Riverpod is completely independent from the widget tree

2. Riverpod can be used to create and enforce unidirectional data flow with model classes that are immutable.

3. Riverpod does not depend directly on the widget tree; its operation is similar to that of a service locator. Providers are declared globally and can be used anywhere in the application

6. ensures code testability and catch programming errors at compile-time rather than at runtime. So it has improved compile safety.

7. Riverpod allows you to easily create, access, and combine providers with minimal boilerplate code

8. comparison of previous and new state

9. implements an undo-redo mechanism

10.debug application state and can inspect your state in the devtool

Watch this video to get idea about Riverpod https://www.youtube.com/watch?v=GVspNESSess

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Malisha Tharindu
Malisha Tharindu

Written by Malisha Tharindu

Entrepreneur | iOS Developer | Web Developer with more than 5 Years of Experience. Founder of Learn with Malisha

Responses (1)

Write a response