Relative Content

Tag Archive for flutterdartriverpod

Flutter Riverpod function not updating data instantly

i created a simple function that add product to cart with buttons to add/reduce product quantity,unfortunately product quantity does not changes as add/reduce button is hit.it changes after some refresh.also the product is not added to cart.please help me identify the problem
These are codes.

Riverpod: How to show error under field on submit

I want to show error under field if there is some error on submit and clear the error when typing again. This is what I have done so far. It works first time but on further attempts to submit it keeps showing error under field since the controller is in error state. I feel like I’m missing a core point of doing this declaratively. I keep thinking imperatively. Is there a neat solution to this, Thanks.

Riverpod – share data between providers

What’s the canonical way to share data between two providers created with riverpod? In addition those two providers might only be very loosely connected logically speaking…