Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
55 views

Flutter: Item is added only when button is pressed twice or more (Riverpod Inventory management)

I have an app that has an inventory of Items and I followed very similar approach to delete, add, update items methods; but add button is only working when pressed twice. If I press it 4 times, same ...
Stooges4's user avatar
0 votes
0 answers
60 views

App shows a blank page when there is an exception in appState

What packages does this bug report belong to? go_router and flutter_riverpod What target platforms are you seeing this bug on? Android, Web, Windows Have you already upgraded your packages? Yes ...
Zia Ur Rahman's user avatar
0 votes
0 answers
148 views

Bad State: no ProviderScope found. I think I have placed the ProviderScope correctly

I am trying to learn riverpod, fairly new here, and I am getting this error, I don't understand why. It states the no providerScope found, but I think I placed it correctly, I rechecked and made sure ...
piedPiper146's user avatar
1 vote
1 answer
570 views

How to pass dependency to AsyncNotifier with the new Riverpod syntax?

I'm currently using the new Riverpod syntax but I'm having an error and haven't been able to find a solution. I need to pass a dependency but it gives me this error The class TaskHomeInit must have a ...
john alexander jimenez morales's user avatar
1 vote
1 answer
360 views

Navigation after a future when using riverpod

There is a Future/Provider that call an API and then return some data @riverpod Future<UserModel> updateProfile( UpdateProfileRef ref, { required String? firstName, required String? ...
Mahmoud's user avatar
  • 510
0 votes
1 answer
1k views

Flutter Riverpod with infinite_scroll_pagination [Need suggestion]

I'm currently stuck in a bit of a confusion. Any assistance on this Flutter issue would be incredibly helpful. Thanks a lot! recently i fall in love with riverpod. i'm using riverpod everywhere....
Tanvir Ibn Mizan's user avatar
1 vote
1 answer
1k views

Riverpod notifier provider call function

I have been using provider as state management and had newly migrated to riverpod. Riverpod has a lot of providers which is confusing for me. I am using NotifierProvider and have issue calling a ...
VDTe's user avatar
  • 523
1 vote
1 answer
834 views

How to refresh all providers in Riverpod

When user logout's from the app, I want to refresh all providers so that the previous user's data will not be stored on current users providers. Is there a global way to do this without using ...
Umut Arpat's user avatar
0 votes
0 answers
58 views

StreamBuilder, Flutter and Firebase

I'm making a Reddit clone and I've just finished the chat part. Everytime I send a message to someone, the database is structured in this way: users/$userid/chats/$receiverid/messages/$...
BlackCult666's user avatar
0 votes
0 answers
240 views

Flutter StreamBuilder with Riverpod

I'm making a chat app and I've just created the chat page with the receiver. And this is the StreamBuilder to get the chat messages, where "chatControllerProvider" is a riverpod Provider ...
BlackCult666's user avatar
0 votes
2 answers
810 views

When using Riverpod StateNotifier, the state is not updating properly, so the ui and the widget is not being rebuilt

When reordering a ReorderableListView, the method reorderIntervals: void reorderIntervals(int oldIndex, int newIndex) { if (newIndex > oldIndex) { newIndex -= 1; } final ListItem ...
Rosas Juan's user avatar
2 votes
1 answer
3k views

Flutter RiverPod StateProvider with auto dispose not disposing the updated value when navigate to next screen

I am using StateProvider with bool value false and update it to true on button Click and move to next screen and use same StateProvider on new screen but StateProvider contains the value as true ...
Sunil's user avatar
  • 153
0 votes
1 answer
484 views

ListView.Builder in Riverpod not updating properly

I'am developing an app with flutter and flutter_riverpod. I want to use listview.Builder with riverpod. But I got some problems it just doesn't update the list when i add a nother user to the liste. I ...
Adam's user avatar
  • 39
-1 votes
1 answer
441 views

How does @riverpod work? I got The argument type 'AutoDisposeNotifierProviderImpl' error

I am using riverpod annotation and stuck here. @riverpod ShopRepository shopRepository(ShopRepositoryRef ref) => ShopRepositoryImpl(dio: authDio(), managerLocalStorage: ref.watch(...
c-an's user avatar
  • 4,020
1 vote
1 answer
1k views

Pagination and Searching with FutureProvider (infinite_scroll_pagination+Riverpod)

infinite_scroll_pagination with FutureProvider (Riverpod) usually i create a FutureProvider which is dependent on search query(StateProvider). final allAgentSearchQueryProvider = StateProvider<...
Tanvir Ibn Mizan's user avatar
1 vote
1 answer
556 views

Trying to implement shopping cart using riverpod

I'm trying to build remote shopping cart "I will add CRUD requests later" For now I'm just trying to build it using Riverpod NotifierProvider in the first stage. I can fill my cart ...
Mohammed M's user avatar
-3 votes
3 answers
319 views

The method 'when' can't be unconditionally invoked because the receiver can be 'null'

I'm trying to do authentication using Riverpod StateNotifier and FutureProvider but I'm facing error when using when method facing this error The method 'when' can't be unconditionally invoked ...
Mohammed M's user avatar
0 votes
2 answers
30 views

'[log] AsyncError<List<Product>>(error: Connection refused, stackTrace: #0' while fetching data

I'm trying to return data from my future provider and use it inside my GridView widget but I got that error. The URL is returning status and data: {"status":"success","data&...
Mohammed M's user avatar
2 votes
2 answers
229 views

Why do we use RiverpodGenerator

What is the point of using RiverpodGenerator or Freezed as I understand we could just do CRUD operations to implement our data using models. But why, when and how do we use RiverpodGenerator?
Mohammed M's user avatar
1 vote
2 answers
500 views

Any initState() replacement present in the Provider ecosystem?

Question: I want to build my app using no stateful widgets and I have a necessity of using initState(). I would be grateful, if anyone from the community can help me with this challenge. Is there any ...
Siddhartha Srivastava's user avatar
0 votes
1 answer
616 views

How can we use Provider with Future?

I'm trying to use MultiProvider with FutureBuilder. Is there source code that uses Firestore with Riverpod or any package to create a cart? Also, how can we use Riverpod and Cart along with Firestore? ...
Mohammed Malek's user avatar
1 vote
1 answer
3k views

How to use a list of objects in a provider with Riverpod

I am building an Flutter app and am struggling with the whole provider/consumer concept and how to solve my problem using Riverpod. I have not worked with Providers/consumers before so I am having a ...
Jerm's user avatar
  • 79
0 votes
1 answer
1k views

Using Hive with Riverpod, not sure what to load during loading phase

I am trying to learn how to use Hive for local storage and Riverpod for state managment in my flutter app. final _localStorageProvider = FutureProvider<Box>( (ref) async { final ...
midNight's user avatar
  • 165
1 vote
3 answers
1k views

Flutter Riverpod UI change only when i hot-reload

When i call toggleFavorite function using a icon button the state is changing but ui not update but when i hot reload it's update. i checked some similar question on stackoverflow but i couldn't ...
Nashaf's user avatar
  • 43
3 votes
1 answer
5k views

Riverpods with hooks Flutter - using Provider

Could someone give an example of additional state modifications in Riverpods preferably with riverpod_hooks - I'd like to be able to use it without making an additional widget, so for example: onPress:...
KatieK's user avatar
  • 81
0 votes
1 answer
2k views

How to access values and functions inside statenotifier in riverpod

I implemented user authentication with the statenotifier in riverpod it works but I don't know how it works in such a manner. I have to create two providers, a StateNotifierProvider to read the values ...
user avatar
1 vote
4 answers
1k views

Flutter Riverpod: pub get failed

I'm currently trying to study using flutter riverpod but i get a problem when i'm trying to put flutter_riverpod package i get this error Because riverpod depends on flutter_riverpod ^0.9.1 which ...
TheNoobProgrammer's user avatar