flutter_widget_from_html
flutter_widget_from_html copied to clipboard
type 'Null' is not a subtype of type 'LiteralTerm' in type cast
Steps to Reproduce
HTML
Some invalid CSS like <div style="background: red; #;">, for context, I'm trying to parse some emails sent using external tools that sometimes generate some invalid CSS selector.
`HtmlWidget` configuration
HtmlWidget(
content,
buildAsync: true,
onErrorBuilder: (context, element, error) {
return const Text('Error parsing the message!');
},
),
Tesing environment
Expected results
don't show the red x icon, and discard invalid HTML and CSS.
Actual results
show a red x icon