I am using the flutter_html package
I have this in my flutter project, i have been trying to style the line height property of the resulting text rendered in my view and its not working and i dont seem to find a solution anywhere. Any help will be appreciated Html(
data: detail.length >= 300 ? detail.substring(0, 300) + " ...": detail.substring(0),
style: {
"html":Style(
/* wordSpacing: 3, */
textAlign: TextAlign.justify,
whiteSpace: WhiteSpace.NORMAL
),
},
)
Currently the Html() widget from flutter_html: ^1.x.x is not supporting line-height property of css.
So you need to use HtmlWidget() from flutter_widget_from_html: ^0.5.x
HtmlWidget(
htmlData,
textStyle: TextStyle(height: 1.8)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With