Closed kadnan0900 closed 4 years ago
ontap(isliked){ challengeModel.is_liked=!isliked; }
Can you give me the proper solution of this problem ?
onTap: (bool isLiked) async { /// save it by yourself challengeModel.likes_count =?; },
Hello,
the issue here is that likeBuilder: (bool isLiked)
is called with the initially set value of isLiked.
so if it was initially false, it will always be false when being rebuild, even if it was changed in an onTap action.
any solutions to this?