Closed clragon closed 6 months ago
Issue had no activity in the last 30 days. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Issue had no activity in the last 30 days. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Is your feature request related to a problem? Please describe. Retrieving values from a store through async means makes everything in flutter 4 times more complicated
Describe the solution you'd like Just like shared preferences and many other storage solutions, a
Vault
could memory cache its current value. Because initialising aVault
already requires an async operation, this is the perfect place to get the first value. After that, theVault
can update its value under the hood whenver an event arrives.Describe alternatives you've considered I can cook up my own solution that is sync
Additional context The intialize async once, use sync mechanism could be a great improvement over the always async approach. It would allow us to make Settings classes which need only be initialized once in main, then can be used fully synchronously for the rest of the runtime.