我的 flutter 应用程序中有一个 html View (带有包 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
最佳答案
现在新版本的flutter_html支持升级依赖到flutter_html:^0.10.4
关于html - 如何修复 HTML-<ul> 列表在 flutter 中显示长列表项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56906547/