I'm building a ListView
with dynamic text in each item. But I want to cap the maximum height of each item and show a 'More' button when the height is bigger than something.
I currently have this in the item:
Container(
constraints: BoxConstraints(maxHeight: 300),
child: Text(htmlContent),
)
Which is capping the height as expected. But how can I display the More
button on the items that do have the height larger than 300?
I can't just check the length of the string htmlContent
because it has HTML tags which make the height variable depending on the tag type. That's why I need to check height somehow