All Questions
Tagged with flutter-riverpod or riverpod
1,633 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
30
views
I used go router and StatefulShellRoute, and the bottom NavigationBar icon clicks, but the color does not change
Bottom Navigation Bar manages the index with Provider, and the code of Bottom Navigation Bar is written as below.
I have a total of 5 icons and I just click on the second icon, but the color changes ...
2
votes
1
answer
99
views
Riverpod AsyncNotifier re-fetches API after logout and causes 401
I'm very new to Riverpod and I'm implementing a login/logout flow using AsyncNotifier.
I fetch the user profile after login and show the username on the home screen.
The issue is:
When I logout, the ...
3
votes
1
answer
184
views
I recently upgraded from Riverpod 2.x to 3.0 and I'm getting a disposal error
Unhandled Exception: Cannot use the Ref of noteControllerProvider after it has been disposed. This typically happens if:
A provider rebuilt, but the previous "build" was still pending and ...
Best practices
0
votes
3
replies
105
views
How to user Riverpod NotifierProvider with Controllers?
I always struggle to hook up Controllers with Riverpod NotifierProvider. For example, TextEditingController, MapController or in this case I need to hook it up with TreeController from the ...
0
votes
1
answer
64
views
GoRouter redirect to initialLocation after riverpod rebuild
I'm experiencing an issue where my Flutter app redirects users to the home page after a successful 401 token refresh, instead of keeping them on their current route. This happens when using GoRouter ...
1
vote
1
answer
142
views
Riverpod 3.0.0 migration: Listeners inside widgets that are not visible are now paused
I am trying to migrate to Riverpod 3.0.0. It says that now Listeners inside widgets that are not visible are now paused.
I have the following setup:
Page A: showing some data and an 'edit'-Button and ...
0
votes
0
answers
108
views
Riverpod StateNotifier works on hot restart, but not on fresh app start
I'm building a Flutter app using Riverpod for state management. I have a SplashScreen that checks for both network connectivity and user authentication status. The SplashScreen should display ...
0
votes
0
answers
45
views
Can't i change state.value directly and do a re-render below way in flutter riverpod?
I am learning flutter riverpod state management. For example say I have a class extending AsyncNotifier class. The state.value is a class object which may include list of another class as its property....
0
votes
1
answer
39
views
The Widgets are not rebuilding when the state changes through button click
The Widgets are not rebuilding when the state changes through button click, I am using a button click to update the state from the App Bar, the value is getting changed in state but not reflecting in ...
0
votes
0
answers
45
views
Build method is called twice and also when editing an application the value does not store in state
I'm using Riverpod 2.6.1 with code generation (@riverpod annotation). My provider's build method makes an API call, but it executes twice when the app starts, causing duplicate network requests. This ...
0
votes
0
answers
249
views
Issue of using Riverpod 2.6.1 with StateNotifierProvider and StateNotifier
I am using Flutter 3.29.0, and I am using this package: universal_html 2.2.4 because import 'dart:html'; is deprecated:
dart:html
The dart:html library is deprecated. Instead, use dart:js_interop and
...
0
votes
1
answer
83
views
ref.listen is not showing dialogs
My Ref.listen is not working. It's not showing the dialogs I want it to show. It's not showing Any dialog. I only see the the logs.
Firebase should be initialized
istener should work
Dismissed loading ...
1
vote
1
answer
83
views
Invoke .read() function in a regular class
Firstly, I have a class with extends StateNotifier<bool> named ButtonStateNotifier:
class ButtonStateNotifier extends StateNotifier<bool> {
ButtonStateNotifier() : super(true);
void ...
1
vote
0
answers
39
views
How to handle riverpods ProviderContainer() with DI in dart frog?
import 'package:dart_frog/dart_frog.dart';
import 'package:riverpod/riverpod.dart';
Handler middleware(Handler handler) {
return handler
.use(provider<ProviderContainer>((context) =>...
0
votes
0
answers
89
views
Why does infinite_scroll_pagination + Riverpod custom state management not trigger a new API call on refresh?
I'm building a Flutter app using infinite_scroll_pagination v5.x and Riverpod for state management. I want to implement infinite scroll with a paginated API and also support pull-to-refresh that ...