html - 如何修复 HTML-<ul> 列表在 flutter 中显示长列表项?

标签 html flutter dart

我的 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/

相关文章:

html - 如何使用 golang 直接从查询导出为 CSV

javascript - 当数据在 jquery 中动态加载时,单击事件不起作用

javascript - Jquery removeClass() 点击

flutter - 如何将 onTap 添加到图像类别

flutter 无法使用静态访问访问另一个类的方法

dart - 如何在dom-if上设置restamp属性

datetime - 在 Flutter/Dart 中获取上个月的日期

python - 接口(interface)错误: 2003: Can't connect to MySQL server on 'localhost:3306' (13 Permission denied)

listview - 如何在 Flutter 中将额外参数传递给 ListView.builder Widget 的 itemBuilder 函数?

Flutter - 从页面修改 AppBar