Questions tagged [flutter-redux]

60 questions
0
votes
1 answer

flutter redux setState will call oninit function and refresh page again #189

Container( child: StoreConnector( onInit: (store) async { await loadMoreData( page: currentPage, extra: {"sorts": sortValue}); }, distinct: true, converter: (store) { return store.state.collectionData; },``` …
0
votes
1 answer

Updating instance of class after being pushed to a List

Consider this dart code: T t = T() // id field defaults to null List list = List()..add(t); t.id = '123'; print('${list.first.id}') // What's output? My question is about whether passed items to List are copied over to List or it's a…
Mehrdad Shokri
  • 1,974
  • 2
  • 29
  • 45
0
votes
1 answer

Should I install redux if I already have installed flutter_redux

I was setting up my app to use redux and had just installed flutter_redux but noticed that class Store was not found to import which should be passed to StoreProvider. After installing redux package separately, imports were available. The site says…
Mehrdad Shokri
  • 1,974
  • 2
  • 29
  • 45
0
votes
1 answer

Generics in TypedReducer in dart's flutter redux

I'm just playing a bit with flutter, and the generics in function call is confusing me. Consider the call below: final signinReducer = combineReducers([ TypedReducer(_validateEmail), …
rahulserver
  • 10,411
  • 24
  • 90
  • 164
0
votes
0 answers

when using build_runner, it showing error with undefined name BuiltList

Currently, I'm doing nested JsonDeserialize using built_value and build_runner. It showing error on generated serailize.g.dart. How do i solve this kind of issue?. I also put it built_collection in pubspec.yaml It fine for original file. My usage…
amlwin
  • 4,059
  • 2
  • 15
  • 34
0
votes
0 answers

Flutter redux: How to clear state on logout in and reinitialise on login

I am new to flutter and have implemented the redux development pattern in the mobile application. On logout I wish to clear the state of the flutter app. Else if Participant 1 logs in and Participant 2 logs in Participant 2 views the data of…
MindBrain
  • 7,398
  • 11
  • 54
  • 74
0
votes
1 answer

how to update a property of a list in flutter redux

I am trying to update some property in flutter redux but i am getting the following error Class 'DivMatches' has no instance setter 'id='. Here is my state class class AppState { var demoState; List myMatches; AppState({this.demoState,…
Hkm Sadek
  • 2,987
  • 9
  • 43
  • 95
0
votes
1 answer

Flutter redux update the specific state variable without affecting other variable

I have a state like this class NameState{ List name; dynamic title; NameState({this.title, this.name}); } Action class NameAction{ List showAction; NameAction(this.showAction); } reducer like this NameState reducer(NameState…
Hkm Sadek
  • 2,987
  • 9
  • 43
  • 95
0
votes
1 answer

How to do periodic / scheduled actions using Flutter Redux?

I'm building a mobile app using Flutter, in which I use flutter_redux and redux_thunk. There's two kind of timed actions I want to achieve: Dispatch certain action every N seconds (repeated) Dispatch an action once after N seconds, likely from a…
Arno Moonen
  • 1,134
  • 2
  • 10
  • 28
0
votes
1 answer

Flutter redux epics - takeUntil action make stream unusable

I am using flutter with redux and for handling stream data I'm using redux-epics. Like this: Stream getDataEpic(Stream actions, EpicStore store) { return Observable(actions) …
exilonX
  • 1,712
  • 3
  • 26
  • 50
0
votes
1 answer

Fetching data on corresponding redux store-state update in a component(widget)

I am using flutter-redux for state management in my project using StoreConnector. Lets say I have a list of songs in the main view and a music player widget in the bottom bar. Everytime a new song is clicked on, the music player widget should make…
Subhash
  • 37
  • 1
  • 7
0
votes
1 answer

how to call dispatch action from a void method in flutter redux

I am trying to perform a dispatch action from a method. Here is how I am trying StoreConnector( converter: (store) => store.state, builder: (context, items) => Column( …
Hkm Sadek
  • 2,987
  • 9
  • 43
  • 95
0
votes
2 answers

Flutter Redux - Handle navigation to a screen in middleware

In my Flutter Redux app I have an authentication middleware that takes care of user authentication calls to an external authentication service. If I want to redirect to another screen on certain responses (for example, go to home screen when the…
0
votes
2 answers

How do i dispatch an action without building a widget in flutter redux?

Im trying to dispatch actions based in events, i couldn't find any way to achieve that with out returning a widget. here is the default way of doing it StoreConnector( converter:(store) => () =>…
Pompidou
  • 577
  • 4
  • 18
0
votes
0 answers

Update state of active widget

Hello everyone and sorry for my English. In general, I have 2 widgets, one is on the screen, the other is somewhere in the navigator. These are 2 different instances of the same widget. Tell me if there is a way to update the status of only the…
1 2 3
4