-
Notifications
You must be signed in to change notification settings - Fork 215
Question regarding storing flutter UI state in cross-platform store #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you need to keep these values in the Store and reuse them for both Flutter and Angular, it's best to create some way to store that data that isn't tied to angular or flutter. Why? Say you're using the Therefore, you can store that Overall, I'd definitely encourage you to split "View Logic" from "Redux Logic." E.g. navigating, showing popups, handing text input, etc are all different between angular and Flutter, and so those parts should be confined to your Flutter or angular app. The shared parts, such as fetching data and parsing JSON, can be reused! It might seem silly to store some stuff in the Redux and other "View Related" data stuff in a StatefulWidget, but overall it will make your store more reusable between platforms and make those Widgets easy to move around since they're self-contained. Does that help? |
Hey Brian thanks for the response. Yeah that does make total sense. I just wasn't sure if mixing stateful widgets with redux was a bad idea, glad to hear it's okay. I was going down the path of using conditional imports for the platform specific parts of the state but just storing the UI stuff separately simplifies things. Thanks |
Sure thing! |
Hi, I have some flutter specific UI variables that I need to store (some are flutter specific data types). Should this king of thing be stored in my redux store? My store will be shared between a Flutter & Angular app which is why there would be issue if I have flutter specific data-types in there.
At the moment I'm using a stateful widget that stores the flutter specific UI stuff however finding it clunky using stateful widgets & redux. What is your recommendation for this situation?
Thanks
The text was updated successfully, but these errors were encountered: