Relative Content

Tag Archive for flutterriverpod

Flutter river pod ref.read not calling the callbacks

I have as simple river pod provider (for testing) but it is not calling the compeltion callbacks.
I am using below package to scan barcode with camera and once barcode is retrived I am calling the provider funtion.

Is it possible for riverpod in flutter to store an image?

I am using riverpod for state management in flutter. I need to have the user select an image, crop it, temporarily store it before uploading it to the server. I am therefore thinking about storing the image in the riverpod provider that holds other data that should also be uploaded. Can riverpod store an image like this? Is this even a good approach? If not, why? And what would be a better approach?

Widget isnt updating with value change

Working on settings for my app and allow users to select the primary theme color. I have a riverpod Notifier provider for the color selected and updating it on select. Part of the UI updates (the color selected is highlighted) and have tested with debug messages that the build method is getting called, but the second bubble widget isnt updating its color. Ive tried with a simple stateful widget and setstate and same outcome. Ive tried wrapping the bubble widget in a consumer widget and still no update. Also used a statebuilder when I was trying with just setstate and stateful widget. Not sure why the bubble widget isnt updating.