I noticed the first load of the favorites view did not load more content once the bottom had been reached. Pulling to refresh however did result in the paging working afterwards.
The problem would arise from _nbImages not having been set at the time it needs - which is why the subsequent reloads work. It looks like this may be getting assigned in _buildImageGrid but that is outside of a setState call so I'm not sure that is completely working there.
Anyway, this adds a .then after the fetchFavorites future (in initState) - inside _nbImages and _imageList are being updated inside a setState call.
I noticed the first load of the favorites view did not load more content once the bottom had been reached. Pulling to refresh however did result in the paging working afterwards.
The problem would arise from
_nbImages
not having been set at the time it needs - which is why the subsequent reloads work. It looks like this may be getting assigned in_buildImageGrid
but that is outside of asetState
call so I'm not sure that is completely working there.Anyway, this adds a
.then
after thefetchFavorites
future (ininitState
) - inside_nbImages
and_imageList
are being updated inside asetState
call.Seems to have things working as expected again!