I use flutter widget Text() for displaying data which comes from API. For example, I got this string with html-content
String test = "List: <li> One;<li> Two;<li> Three.";
My widget with this variable:
Text(test)
Is there a way to remove all html-tags from String value?
2
Answers
To remove html tags from a string you can use this code:
You can change the
RegExp
according to your needs.This extension should do it
Then use it like