w_flutter_tree 0.0.1 copy "w_flutter_tree: ^0.0.1" to clipboard
w_flutter_tree: ^0.0.1 copied to clipboard

一个简单的树形图展示库

w_flutter_tree #

一个简单的树形图展示库

Getting Started #

import 'package:w_flutter_tree/w_flutter_tree.dart';
/// 上下左右滚动
ListView(
          children: [
            SingleChildScrollView(
              scrollDirection: Axis.horizontal,
              physics: const AlwaysScrollableScrollPhysics(),
              child: TreeWidget<TreeModel>(
                style: CustomTreeNodeStyle(),
                node: TreeModel(
                  name: '根节点',
                  trees: [
                    TreeModel(name: '节点1', trees: [
                      TreeModel(
                        name: '节点1-1',
                        trees: [
                          TreeModel(name: '节点1-1-1'),
                        ],
                      ),
                      TreeModel(name: '节点1-2'),
                      TreeModel(name: '节点1-3'),
                    ]),
                    TreeModel(
                      name: '节点2',
                      trees: [
                        TreeModel(name: '节点2-1'),
                        TreeModel(name: '节点2-2'),
                        TreeModel(name: '节点2-3'),
                      ],
                    ),
                  ],
                ),
                builder: (node) {
                  return CustomTreeNodeWidget(data: node);
                },
              ),
            )
          ],
        )

示例详情见Example #

树图配置 #

可配置
strokeColor
strokeWidth
direction
mainAxisLeadingWidth
mainAxisTrailingWidth
crossAxisSpace
自定义画线样式

展示图 #

iphone macos

3
likes
135
points
6
downloads

Publisher

unverified uploader

Weekly Downloads

一个简单的树形图展示库

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on w_flutter_tree

Packages that implement w_flutter_tree