Questions tagged [flutter-redux]
60 questions
1
vote
1 answer
Flutter Testing Redux-Saga with Action Argument
I'm trying to test a saga where the parameter is an action however I am getting the following error
NoSuchMethodError: Closure call with mismatched arguments: function 'startUp'
Receiver: Closure: ({dynamic action}) => dynamic from Function…
user11433531
1
vote
1 answer
What does the hash code have to do in this Flutter Redux example
I am looking at this example
@immutable
class UserState {
final bool isLoading;
final LoginResponse user;
UserState({
@required this.isLoading,
@required this.user,
});
factory UserState.initial() {
return new…

user3808307
- 2,270
- 9
- 45
- 99
1
vote
1 answer
How to pass parameters to action in Flutter
I have this action
Future signUpAction(Store store) async {
try {
// ...
} catch (e) {
// ..
}
}
And I dispatch it like this
store.dispatch(signUpAction);
Now, if I want to pass two paramters, how would I do that?…

user3808307
- 2,270
- 9
- 45
- 99
1
vote
2 answers
Flutter redux Navigator.pop() in StoreConnector after user login
How I can do Navigator.of(context).pop((route) => false); on my Login screen?
class _LoginState extends State with SingleTickerProviderStateMixin {
String email = '';
String password = '';
final Store store;
final _formKey =…

Paweł Jadach
- 21
- 6
1
vote
0 answers
flutter redux state changed without dispatching actions
I'm using redux and bloc together.
I have a edit profile screen and I get initial value from redux state and then change values in bloc.
But when my bloc state changed, redux state change too without dispatching action.
I want to change redux state…

BeHappy
- 3,705
- 5
- 18
- 59
1
vote
1 answer
Flutter Redux: How to wait for multiple dispatch results and dispatch an actions when all actions are completed
When the app starts, I dispatch an action FetchLocalDataRequestAction and intercept this action in a middleware and dispatch multiple actions. I want to dispatch FetchLocalDataCompleteAction actions when all actions are completed. I was expecting…

Sanjay Sahani
- 565
- 4
- 14
1
vote
0 answers
How to create model with .g file in flutter-redux-starter
./starter.sh make
This command generates not generate .g file. which contain serializer and deserialize.
More about flutter-redux-starter
https://github.com/hillelcoren/flutter-redux-starter

Nalawala Murtuza
- 4,605
- 1
- 12
- 21
1
vote
1 answer
Dart, Flutter Redux Thunk unit testing
I have written the following code and am trying to test a redux thunk action in flutter. Unfortunately when I debug the code, I can see the thunkMiddleware doesn't intercept the action as expected (as the returned Function(store) never gets…

aprofromindia
- 1,111
- 1
- 13
- 27
1
vote
1 answer
Compare old view model and current view model in Flutter redux
In Flutter-redux, we can use onDidChange and onWillChange to detect changes in store state. But is there a way to detect change in particular properties?
Can I do something like
if(oldViewModel.changedProperty != viewModel.changedProperty)
In…

Subhash
- 37
- 1
- 7
1
vote
1 answer
How to dispatch multiple async actions that are based on the result of another async action?
Once my user login is successful and I have a Firebase User I want to check if there is already a Profile created on my server by dispatching an action which makes an async call to get a Profile.
If no Profile is returned I want to navigate the…

Titus Juocepis
- 39
- 7
1
vote
1 answer
How do I prevent firestore from loading entire user data every time the app loads
I am using flutter with redux for state management. When the app loads I am loading the data from firestore to populate my redux state. Now the problem is every time the app initializes it makes 800+ document reads. The only source of changes to the…

Aasiz
- 647
- 8
- 18
1
vote
1 answer
How to debug a flutter redux application
I am new to flutter and will be implementing the redux framework in my flutter app. I would like to monitor the state of my application and thus, would like to know if I could use a redux flutter debugger.

MindBrain
- 7,398
- 11
- 54
- 74
1
vote
1 answer
How to test Flutter apps using flutter_redux?
I tried to write the first smoke test for my Flutter app:
class MockStore extends Mock implements Store {}
void main() {
MockStore mockStore;
setUp(() {
mockStore = MockStore();
…

Dawid Hyży
- 3,581
- 5
- 26
- 41
1
vote
1 answer
Navigate to a new screen and passing the redux store state when using a viewmodel
I have the need to pass the redux store state from a screen to another inside the build function.
My problem is that in the build function I have the ViewModel variable, that does not have a reference to the state.
This is the code of the…

Giacomo M
- 4,450
- 7
- 28
- 57
1
vote
1 answer
Routes in Flutter using Redux
Where is the best place to manage routes in a Flutter App, when we use Redux? Because im follow some examples and some of them routing in actions and others in middlewares and even in containers.

Rubens Melo
- 3,111
- 15
- 23