When implementing the Bungie API error handling, I tried to make the screen reload when the API is down. When doing that, I implemented my FutureBuilder as follows:
When implementing the pagination with slivers, I tried to use the setState function. Unfortunately, this made my FutureBuilder reload on each call of setState, calling my function getManifest() and getNewsArticles() again and again.
Thus I decided to use the Infinite Scroll Pagination package that doesn't use or trigger the setState function of my parent view. Now, when the user scrolls down, the app fetches some more articles at the bottom of the screen.
When implementing the Bungie API error handling, I tried to make the screen reload when the API is down. When doing that, I implemented my FutureBuilder as follows:
https://github.com/0Nom4D/GuardianDock/blob/389f048225024861cae9a9722ca293654d8481ac/lib/src/views/home_view.dart#L34-L39
When implementing the pagination with slivers, I tried to use the setState function. Unfortunately, this made my FutureBuilder reload on each call of setState, calling my function
getManifest()
andgetNewsArticles()
again and again.Thus I decided to use the Infinite Scroll Pagination package that doesn't use or trigger the setState function of my parent view. Now, when the user scrolls down, the app fetches some more articles at the bottom of the screen.