Answer the question
In order to leave comments, you need to log in
How to organize like/unlike work in Flutter?
While working on the project, an interesting problem arose.
Namely, the post like system in Flutter.
There is input with request API = (isLiked = true/false ).
How to change like states on click. The obvious solution is:
if ( isLiked ) {
setState((){
_isliked = !isLiked
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question