我在flutter应用程序中有一个html视图(带有flutter_html包:^ 0.9.6)。
不幸的是,如果列表项的内容超过1行,它将在项目符号点后立即中断行。
如何使列表项在要点之后不中断?
我试图将其设置为<ul style='display: block;'>
无效。与<li style='display: block;'>
此代码创建列表:
String list = "<ul>";
list = list + "<li>this is text for one line</li>\n";
list = list + "<li>this is where the problem comes because the
text is longer than one line and there is a break
after the bullet</li>\n";
list = "$list </ul>";
我期望:
- this is text for one line
- this is where the problem comes because the
text is longer than one line and there is a break
after the bullet
但是我得到了
- this is text for one line
-
this is where the problem comes because the
text is longer than one line and there is a break
after the bullet
答案 0 :(得分:1)
现在新版本的flutter_html中支持它,将您的依赖项升级到flutter_html:^ 0.10.4