Flutter Reaction Button is a customizable Flutter package that allows you to easily create interactive buttons with reaction emojis, similar to Facebook's iconic reaction buttons.
Page A have list of posts that contain a single FlutterReactionButtonCheck.
Page B have a single FlutterReactionButtonCheck
My scenario is when I go to Page B and update reaction from index 1 to 2. When I come back to Page A. I wanted update a FlutterReactionButtonCheck reaction.
What I have done is send callback function from Page A to Page B. Whenever the reaction changed i will call a callbackfunction to setState of a reaction in PageA. But it still not update.
This is a call back function in Page A
updateReaction(int newReaction) {
print('update new reaction to: $newReaction');
setState(() {
this.userReaction = newReaction;
});
}
This is a FlutterReactionButtonCheck setup in Page A.
Assume I have 2 pages (Page A and B)
Page A have list of posts that contain a single FlutterReactionButtonCheck. Page B have a single FlutterReactionButtonCheck
My scenario is when I go to Page B and update reaction from index 1 to 2. When I come back to Page A. I wanted update a FlutterReactionButtonCheck reaction.
What I have done is send callback function from Page A to Page B. Whenever the reaction changed i will call a callbackfunction to setState of a reaction in PageA. But it still not update.
This is a call back function in Page A
This is a FlutterReactionButtonCheck setup in Page A.
In page B whenever
onReactionChanged
called will triggerupdateReaction(reactions.id)
Thanks in advance.