I have implemented a like and post system into one of my apps. However, when I press the like button, i want it to go from an outline to a full heart. I am using toggle buttons for this.
However, I need to switch page for the effect to take place.
So I like the post, the user gets added to the likes, the like number stays the same. The changes don't take affect until I switch page and then switch back then the heart is full.
Same with posts, I can write a post and send it. I have added a snack bar to say the post has been sent. But it doesn't appear on the feed unless I switch page and then switch back.
How to get posts and likes to update seamlessly, without switching page?
Widgets & Design
Resolved
I have tried updating the page state and rebuilding the page.
I have tried the same but with app state.
I tried implementing refresh database request but it said there was no request to refresh.
No
1
11 replies