Ensure that the selected photo change is propogated to fix the issue where in the favorite button was not getting updated

This commit is contained in:
Vishnu Mohandas 2020-06-19 00:09:05 +05:30
parent a99bfde90d
commit 1e92a0ad08

View file

@ -67,7 +67,9 @@ class _DetailPageState extends State<DetailPage> {
return image;
},
onPageChanged: (index) {
_selectedIndex = index;
setState(() {
_selectedIndex = index;
});
_preloadPhotos(index);
},
physics: _shouldDisableScroll