flutter_settings_screens icon indicating copy to clipboard operation
flutter_settings_screens copied to clipboard

Potentially dangerous code - dangling futures!

Open raygray opened this issue 3 years ago • 2 comments

Your code treats SharedPreferences' setters (setInt, setDouble...) as synchronous functions (see SharePreferenceCache::setObject) while they are in fact asynchronous! This may lead to an inconsistent state.

raygray avatar Nov 19 '20 02:11 raygray

Please wait for an update which is coming soon and then check again. This issue has been resolved already but I am completing a set of tasks after which I will publish an update with the new changes.

Never the less if you can pin point some location in the code of your concern, it's help me figure out the issue so that I can help you out.

I appreciate the time you took to bring light on this issue.

GAM3RG33K avatar Dec 13 '20 06:12 GAM3RG33K

(Just a note that this has been resolved for the setters, and is likely to be resolved for the getters as well in the near future, the latter being required for arbitrary other-Cache implementors).

IanDarwin avatar Mar 26 '21 00:03 IanDarwin