Action Output API and change button text value

Hello everyone

I use FlutterFlow to create an application, which retrieves API data from a Joomla social network extension.

I'm progressing well but there are stages where I'm still stuck.

The HomePage displays users' stream items.

A blue button displays the value of the reaction already given by the user (like) for the stream item concerned. If no reaction has been given, the value is false.

Then, when the user clicks on this button, an API request is sent to the server. Either this creates the "like" value, or it removes this value by transforming it into a "false" value.

This API request gives a result containing the value "selectedReaction".

My question is that I would like after the Backend Call Api action, FlutterFlow gets the "selectedReaction" value from the Api Response (Action Output), and displays it in the blue button.

And as a bonus, if the value is "false" we display the following text "Like now".

Do you have an idea ?

We probably need a custom Action, or custom Widget. But I can't seem to find many code examples.

Thank you

Philippe

1
3 replies