toPlainText static method
Strips HTML tags and unescapes HTML entities in one operation.
Returns null if the input is null, empty, or tags-only.
Example:
HtmlUtils.toPlainText('<p>Hello & World</p>');
// 'Hello & World'
Implementation
@useResult
static String? toPlainText(String? htmlText) {
final String? stripped = removeHtmlTags(htmlText);
return stripped == null ? null : unescape(stripped);
}