Reputation: 1
I am using flutter_widget_from_html: 0.9.0+1. Faced a problem, some widgets do not use customStyleBuilder and do not use TextStyle. Who creates a solution to the problem. Thanks in advance.
Its HTML string doesnt work
String value1 = '''
<p class=\"\">
<span style=\"font-family: 'OpenSans-Semibold'; font-size: 56px; line-height: 64px;\">
Hello World Not Working
</span>
</p>
But this HTML string is working
String value = '''
<p class=\"\">
<span style=\"font-family: OpenSans-Semibold; font-size: 56px; line-height: 64px;\">
<strong>
Hello World Working
</strong>
</span>
</p>''';
Flutter Widget Code
HtmlWidget(
value,
textStyle: TextStyle(
fontFamily: 'Arial',
fontSize: 20,
),
customStylesBuilder: (element) {
return {
'font-size': '20px',
};
},
`
Thanks everyone for the help
I tried many different solutions but nothing worked. But i need use only flutter_widget_from_html, flutter_html not suitableю
Upvotes: 0
Views: 1463