I am fetching data from API in Flutter and want to show it's contents. How should I show contents of a field which has html tags in it. Like, this is a data that I am getting -
{"id":509,"topic_name":"HTML testing","description":"<p>E EJ <em> jn ajsf</em><strong><em>ajs nfjnsa </em></strong></p>","status":true,"is_deleted":false,"position":1,"chapter":28,"bookmark_status":false,"is_redeemed":false,"images":[],"videos":[],"files":[],"iframes":[]}
As you can see in the description field, I am getting a string which has formatting in HTML style. How should I show this in my Flutter App inside Text widget?
I am currently using it like this -
Text(
HtmlCharacterEntities.decode(widget.dataList[widget.index].description!),
style: TextStyle(
fontSize: bodyText2Size - 1,
fontWeight: FontWeight.w400,
color: secondaryTextColor,
height: 1.5,
),
),
And I am not able to use flutter_html package, as my flutter_svg and flutter_html versions are not resolving with each other.