如何解决HTML- <ul>列表在颤动中显示长列表项的问题?

时间:2019-07-05 16:28:44

标签: html flutter dart

我在flutter应用程序中有一个html视图(带有flutter_html包:^ 0.9.6)。

不幸的是,如果列表项的内容超过1行,它将在项目符号点后立即中断行。

here you see it

如何使列表项在要点之后不中断?

我试图将其设置为<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

1 个答案:

答案 0 :(得分:1)

现在新版本的flutter_html中支持它,将您的依赖项升级到flutter_html:^ 0.10.4