Questions tagged [flutter-redux]

60 questions
6
votes
1 answer

How to read store values outside of the render tree in Flutter

I am learning flutter and trying to integrate with redux for store managment. All the examples I see the store is accessed in the render part of the widget, for example like so: Padding( padding: EdgeInsets.all(2.0), child:…
user3808307
  • 2,270
  • 9
  • 45
  • 99
5
votes
3 answers

Making Private Route in Flutter

How can I make a wrapper over my private routes, which navigate to screen only when user is authorized, otherwise redirect to login and get back to the original screen after login. How can make this in a generalized way, so that I just reuse it on…
Ravi Garg
  • 1,378
  • 12
  • 23
5
votes
1 answer

Best way to handle asyncronous events in flutter redux

While starting to build an app using flutter and redux I came across the following issue: What's the best way to handle a network request or any asynchronous action? The context: Make an asynchronous call to get a string from the server side (In my…
exilonX
  • 1,712
  • 3
  • 26
  • 50
4
votes
1 answer

Flutter redux: StoreConnector vs StoreProvider

I've been using flutter_redux for only very few days and I'm wondering what's the difference between: class BtnCustom extends StatelessWidget { @override Widget build(BuildContext context) { final store =…
Olivier Picault
  • 338
  • 5
  • 14
2
votes
1 answer

Update data every time a screen is shown on device in Flutter

I have a flutter app with redux state management. In my app, I want to refetch some data from server when some other data in other screen changed. But in my case, I navigate from screen1 to screen2, and some data chaned in screen 2. I use a boolean…
Mohamadamin
  • 564
  • 5
  • 16
2
votes
1 answer

How to Mix Sound Null Safety and Unsound Null Safety in Flutter

I am building a Flutter app and I need to use the flutter_redux package for my global state management. Unfortunately when I added it and try to execute my app I am getting the below error: Error: Cannot run with sound null safety, because the…
ololo
  • 1,326
  • 2
  • 14
  • 47
2
votes
2 answers

Is there a way to make a conditional rebuild of a widget

I am trying to recreate the robinhood number_change animation slide Since I want to run the animation every time the state number changes, I thought using a State provider would help. I am currently using Redux. I am using animatedList to add and…
bihire boris
  • 1,530
  • 3
  • 19
  • 44
2
votes
1 answer

Combine reducers in Flutter

I am using Redux with Flutter with this library. If the solution is to change to redux dart library then I will change it. This is the code I have for the store, I have been taking parts from different tutorials @immutable class AppState { final…
user3808307
  • 2,270
  • 9
  • 45
  • 99
2
votes
1 answer

Flutter Looking up a deactivated widget when showing snackbar from build context

I have a screen, that draws multiple child widgets called EventCard. Each of this cards have a switch button that can be clicked and it will dispatch a redux action to fire a HTTP call in order to update the model in the database with one of the…
Michal Takáč
  • 1,005
  • 3
  • 17
  • 37
2
votes
1 answer

Redux how to update computed state

I'm learning redux (in Flutter using Firestore, but I don't think that matters), trying to get beyond the basics, and I'm confused about where 'computed state' (not even sure what to call it) should go. Say I have app state like this: user: an…
goodson
  • 727
  • 2
  • 14
  • 24
2
votes
1 answer

How to watch state changes in flutter redux

I'm new to Flutter Redux, I got a problem and I have no idea how to deal with it at all! I extracted the main code to keep this simple - tap indicators to switch PageView, scroll PageView to synchronise the indicator. Here is my code: app…
Felix Wang
  • 147
  • 1
  • 3
  • 7
2
votes
1 answer

How to handle connection lost in a Flutter + Redux appp

I've a flupper + redux app and I want to detect whene the connectivity is gone and display a waiting screen. I've subscribed MyApp to a property in my state called state.haveInternet with the idea of rebuild the whole app when the state.haveInternet…
user3712489
  • 61
  • 1
  • 2
2
votes
1 answer

How to handle normalized state in flutter/redux

To keep my app as performant as possible and code testable and maintainable i read about normalizing the redux state: https://redux.js.org/recipes/structuringreducers/normalizingstateshape I was wondering if something like this is possible with…
puelo
  • 5,464
  • 2
  • 34
  • 62
2
votes
1 answer

How to load app state asynchronously from server while creating store in flutter redux?

Basically I want to load firebase remote config parameters when app starts and store it in app state while creating store. So that whenever I need it I just fetch it from store and get remoteConfig value. class App extends StatelessWidget { // Get…
WitVault
  • 23,445
  • 19
  • 103
  • 133
1
vote
1 answer

Flutter: Redirect to a Route from inside a Widget build

I have routes that the Widget depends on the arguments given. My issue is when the user hits the route directly, so as the argument would be null and page will fail to load. I would like to conditionally redirect the user, so currently I have... To…
caiovisk
  • 3,667
  • 1
  • 12
  • 18
1
2 3 4