All Questions
9 questions
0
votes
0
answers
32
views
flutter_hooks - how to access TextEditingController outside the build()-method?
Flutter hooks needs to be created within the build method of a widget by design.
Let's assume I have a hook for using a TextEditingController, how can I access the TextEditingController outside the ...
0
votes
1
answer
87
views
How to disable skipLoadingOnRefresh with flutter riverpod using switch expression
Lets say i have this simple future riverpod which is
@riverpod
Future<double> balance(BalanceRef ref) async {
await Future.delayed(const Duration(seconds: 5));
return 100;
}
and inside ...
0
votes
1
answer
1k
views
I have the error "Cannot use "ref" after the widget was disposed", what's wrong?
I have a loading provider, and whenver I need to do an async work
I set the loading state to true and at the finish time of asynchronous tasks I set it to false
but when I want to do so I get the ...
1
vote
1
answer
501
views
Dispose hook on widget rebuild
Do hooks dispose of themselves when a widget rebuilds? Is it possible to cause this behavior?
I'm using Riverpod for state management and I have a widget that creates a custom TextEditingController ...
2
votes
1
answer
1k
views
Riverpod : future provider is stuck on loading
Describe the bug
when executing the provider with ref.read or ref.watch the result is the same , it is stuck on the loading block , while testing the api in postman works fine , the funny thing is ...
0
votes
2
answers
495
views
LateInitializationError: Local 'prefs' has not been initialized
I am working with riverpod and flutter_hooks
I am trying to get implement shared_prefrences using this 2 approaches and this is what I get to so far :
pref_changenotifier.dart
import 'package:flutter/...
2
votes
0
answers
4k
views
How to refresh Riverpod FutureProvider using FlutterHooks useEffect
I am developing mobile application with flutter using flutter hooks.
I want to refresh Riverpod FuttureProvider using useEffect,
but it doesn't work nicely...
My code is
@hwidget
Widget someWidget(...
1
vote
1
answer
1k
views
StateNotifierProvider not updating state using HookWidget
I am trying to use Riverpod state management. I have two TextFormField and I want to set the value of a Text by taking the sum of the values entered in each of the fields using a StateNotifierProvider....
19
votes
6
answers
21k
views
error `pumpAndSettle timed out` MAYBE due to riverpod
I'm stuck with a widget test and I could use some help
to reproduce the behavior please run the code sample below
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod....