Closed hemantchauhan closed 1 year ago
I have the same problem in my app. IMO I would not expect that a html rendering library also supports detecting links. However I use the Linkify Package for this to manipulate the html string before I render it:
final linkifiedHtmlString = linkify(
htmlString,
options: const LinkifyOptions(humanize: false),
).map(
(element) {
if (element is! UrlElement ||
element.text.contains('<') ||
element.text.contains('>') ||
element.text.contains('"')) {
return element.text;
}
return '<a href="${element.url}">${element.text}</a>';
},
).join('');
right. thanks @krille-chan
@krille-chan is correct
Hello team,
Below is a sample html text that i am getting from our backend -
As there are no href tags here, the library does not convert the http links into hyperlinks. How can I achieve this?