A good approach is to maintain two separate lists in the Bloc:
1.Main List
2.Favourite List (Liked Photos): This list contains only the IDs of liked photos.
The UI should be rendered based on the Favorites List. When a user likes a photo, its ID is added to the favorites list, and the UI updates accordingly without modifying the main list.
Whe the app is restarted, the favorites list is loaded from local storage (e.g., Hive or SharedPreferences) to persist the liked state
A separate event handles adding/removing likes, ensuring that the UI updates instantly without reloading the entire list.
This method keeps performance optimized while ensuring a smooth user experience