作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我需要显示像 Screen Below 这样的带有 TreeView 和连接器的设计时,我正在制作一个屏幕。如果有人可以建议我如何从概念上创建这样的设计,那将是一个很大的帮助。我试过 Gridview和 tree_view到目前为止。
GridView.count(
// Create a grid with 2 columns. If you change the scrollDirection to
// horizontal, this produces 2 rows.
crossAxisCount: 2,
// Generate 100 widgets that display their index in the List.
children: List.generate(100, (index) {
return Center(
child: Text(
'Item $index',
style: Theme.of(context).textTheme.headline,
),
);
}),
);
最佳答案
使用名为 GraphView 的公共(public) flutter 包
Flutter GraphView is used to display data in graph structures. It candisplay Tree layout, Directed and Layered graph. Useful for FamilyTree, Hierarchy View.
The library is designed to support different graph layouts and currently works excellent with small graphs.
关于flutter - 如何在 Flutter 中创建 TreeView 布局?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58941074/
我是一名优秀的程序员,十分优秀!