Types of Subscription Models

The subscription eCommerce business has been around for a while. As more individuals look for ways to save money, it has recently grown in popularity once more. With numerous companies hopping on…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Experiments with the new Riverpod 2.0 Notifier

Learn some details about using Riverpod 2.0

Version 2.0 of Riverpod was released on Sep 30, 2022. At the moment it has reached version 2.1.1. So it is quite fresh and there isn’t yet much info available on medium.com or Youtube. Even the documentation on riverpod.dev is not yet updated with details.

Riverpod 2.0 adds two new provider types together with their modifiers autoDispose and family:

The documentation doesn’t mention them yet, but maybe you will find them when you are reading this article later than November 2022. In this article, I will only use NotifierProvider. Maybe in a second part, I add an experiment for AsyncNotifierProvider.

To learn more about NotifierProvider I created a little example app. It is a bit similar to the standard counter app but uses Riverpod to increment and display several counter values. I added print statements at the interesting spots and configured an observer to monitor all changes in Riverpod’s container.

Here is the source of the CounterNew class, a minimalistic counter:

Add a comment

Related posts:

Powpad launching on UniW Pad

We are delighted to announce that we’ve officially partnered with UniW Pad, a leading decentralized crypto trading protocol to launch Powpad, the launchpad for the next generation of GameFi, NFT and…

New Friends

Alora mengecek aplikasi ojek onlinenya, dan ternyata driver yang ia pesan sudah dekat di daerah rumahnya. Alora pun bersiap-siap dan turun ke lantai bawah, untuk pamit ke ART nya. "Bi Inah, Lora…

How to keep moving forward despite the roadblocks?

Everybody needs help. Acknowledge it. Internalize it and identify people who will stand by your cause in difficult situations. It is, of course, easier said than done. Earning trust is both a…