smooth-app icon indicating copy to clipboard operation
smooth-app copied to clipboard

Don't use FutureBuilders

Open monsieurtanuki opened this issue 1 year ago • 2 comments

Oh no, please don't use a FutureBuilder, that's the shittiest Widget ever. A separated class with a ValueNotifier-like thing or I don't know which state management solution, but never mix UI with how the data is fetched.

I know the app uses this pattern everywhere, but if I can stop the spreading of this 🦠, I prefer.

Originally posted by @g123k in https://github.com/openfoodfacts/smooth-app/pull/4866#discussion_r1420543848

monsieurtanuki avatar Dec 08 '23 15:12 monsieurtanuki

Hey @monsieurtanuki and @g123k,

I want to start on this. Any alternatives you have in your mind? I recently started open source contribution so i think this would be good challenging task for me.

ishanvaghani avatar Jan 11 '24 07:01 ishanvaghani

Hi @ishanvaghani! I'll let @g123k answer you about a better technical solution, as it was his initial remark. My only suggestion would be to focus on one single class first, e.g. CountrySelector.

monsieurtanuki avatar Jan 11 '24 09:01 monsieurtanuki