如何在Flutter中创建树形视图布局?

问题描述 投票:0回答:1

当我需要显示树状视图和连接器之类的设计时,我正在制作一个屏幕。如果有人可以从概念上建议我如何创建这样的设计,这将是非常有用的。到目前为止,我已经尝试过Gridviewtree_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,
      ),
    );
  }),
);

enter image description here

flutter flutter-layout
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.