Questions tagged [flutter-hooks]
81 questions
0
votes
2 answers
Using Flutter Hooks library, I'm getting a race conflict when I try to use the navigator in useEffect
Flutter Hooks useEffect Docs
I dispatch an API request in my onSubmit event that has a side effect of turning signupHelper.state.success to true. I would like to navigate to another screen when success == true. Instead I get an error for…

Irrevocable
- 39
- 1
- 6
0
votes
1 answer
Unnecessary rebuilds with flutter_hooks
I'm attempting to use StateNotifier, Provider, flutter_hooks, and functional_widget together.
I'm seeing rebuilds in the widget hierarchy where I am not expecting them. I've setup a simple use case below.
My bloc has a method updateName() which is…

Matthew Smith
- 4,387
- 3
- 15
- 14
0
votes
2 answers
Validate TextFormField with flutter hooks
I'm trying to move to flutter_hooks but I can't get some simple textformField validation to work.
I have 2 textfields and a button and I'd like to show an error on some conditions (or at least when the textfield is empty)
My…

user1445685
- 793
- 1
- 11
- 25
0
votes
1 answer
Initializing riverpod Provider with a custom ChangeNotifier
I'm just trying out the new river_pod, flutter state management library. My goal here is simple. GestureDetector in the main page listens to vertical drags and updates the animation controller accordingly. And I'd like to listen to this animation…

Vinayak
- 33
- 2
- 5
0
votes
1 answer
Flutter - Convert StatefulWidget to HookWidget with disposable bloc
i read about flutter hooks some weeks ago and wanted to implement it now in my new project. My kind of "base" widget is a stateful widget which has the mixin RouteAware cause of some project reasons. Furthermore each has a bloc which provides…

Yetispapa
- 2,174
- 2
- 30
- 52
-1
votes
1 answer
useTabController index never changes
I am using hooks for handling tab controller, the problem is when i print the current index of the controller it is right. But when i try to display it inside a text widget it is never changes! how could i use it?
The code is:
class TabBarDemo…

Mariam Albarghouti
- 409
- 5
- 22