Skip to content

Fix _handleIsLikeChanged which stops animations when a remote initial value of isLiked is provided to LikeButton#77

Open
azy99 wants to merge 1 commit into
fluttercandies:masterfrom
azy99:bug
Open

Fix _handleIsLikeChanged which stops animations when a remote initial value of isLiked is provided to LikeButton#77
azy99 wants to merge 1 commit into
fluttercandies:masterfrom
azy99:bug

Conversation

@azy99

@azy99 azy99 commented Jan 29, 2023

Copy link
Copy Markdown

Fix _handleIsLikeChanged which stops animations when a remote initial value (eg: from Firestore) of isLiked is provided to LikeButton. The comparison isLiked != _isLiked is unnecessary

@zmtzawqlp

Copy link
Copy Markdown
Member

any runnable demo? i also use hive to cache the value, but i didn't meet your problem

@azy99

azy99 commented Jan 31, 2023

Copy link
Copy Markdown
Author

I do not have a runnable demo because it is a private project. What I had in the project is a list of cards from a stream. The cards have buttons. The value of the button is saved in firestore.
But anyways what exactly is the purpose of comparing isLiked to _isLiked?

@zmtzawqlp

Copy link
Copy Markdown
Member

I do not have a runnable demo because it is a private project. What I had in the project is a list of cards from a stream. The cards have buttons. The value of the button is saved in firestore. But anyways what exactly is the purpose of comparing isLiked to _isLiked?

why need to setstate if it is not changed? i can't find the result with more info about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants