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:
parent
a99bfde90d
commit
1e92a0ad08
1 changed files with 3 additions and 1 deletions
|
@ -67,7 +67,9 @@ class _DetailPageState extends State<DetailPage> {
|
|||
return image;
|
||||
},
|
||||
onPageChanged: (index) {
|
||||
_selectedIndex = index;
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
});
|
||||
_preloadPhotos(index);
|
||||
},
|
||||
physics: _shouldDisableScroll
|
||||
|
|
Loading…
Add table
Reference in a new issue