Add a Column widget after the Image widget and set its Cross Axis Alignment to Start.
Now, add the Text and Row widget inside the Column.
Add the Icon (set to Favorite icon) and Text widget inside the Row.
2. Showing Backend Data
After you have designed the page, make sure you display data from the backend. You can display the data using the instructions here.
See the likes count for the picture is displayed as 0 when a picture has no likes. Let's hide the likes count text(with count 0) using Conditional Visibility in the next section.
3. Show/Hide UI Elements Based on Data
Conditional Visibility allows you to define a condition based on two values. The UI element can be displayed based on the result which can be True or False. If the result is True the UI element is displayed.
Conditional Visibility Example
As seen in the above figure, the UI element is displayed only when the First Value (likes_count) is greater than (>) 0 (Second Value).
Here's an example of how to apply Conditional Visibility to UI elements:
Select the Widget that you would like to show/hide based on condition.
Move to the Property Editor (on the right side of your screen) and scroll down to the Visibility section. Click on it to open the section.
Click on the Unset text. (This will open a new panel).
Find the Source dropdown, click on unset, and select the Condition.
Under the Condition section, Click on the First Value text, set the Source to [collection] Record (from ListView).
Set the Available Option to the Field that you want to compare with.
Click on the Equal To dropdown and select the appropriate option from the list.
Click on the Second Value text, set the Value Source to Specific Value.
Set the Value to whatever you would like to compare it with the First Value.
When you run the app, see how the list shows likes count only when a picture has any likes.
Using Conditional Visibility to Filter A List
You can use the Conditional Visibility fundamental to filter a list based on a condition. For example, you may display only favorite items from the full list.