gpt4 book ai didi

html - 如何解决HTML-
    列表在 flutter 中显示长列表项的问题?

转载 作者:行者123 更新时间:2023-12-03 03:40:23 25 4
gpt4 key购买 nike

我在flutter应用程序中有一个html View (带有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

最佳答案

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

关于html - 如何解决HTML- <ul>列表在 flutter 中显示长列表项的问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56906547/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com