# flexible_tree_view **Repository Path**: newcoretech/flexible_tree_view ## Basic Information - **Project Name**: flexible_tree_view - **Description**: A highly flexible tree view on flutter. - **Primary Language**: Dart - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-29 - **Last Updated**: 2022-08-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![](https://tva1.sinaimg.cn/large/008i3skNgy1gyujo33a5sj30qs0atmxc.jpg) ## Features - Expand / Collapse the tree nodes; - Show lines of parent -> child nodes; - High flexible to custom node widget ## Getting tarted ```yaml dependencies: flexible_tree_view: ^0.0.5 ``` ## Screen shot ![](https://tva1.sinaimg.cn/large/008i3skNgy1gyui2q97xmj312a0u0jsh.jpg) ![](https://tva1.sinaimg.cn/large/008i3skNgy1gyuilaokvjg30qo0f01j4.gif) ## Usage ```dart import 'package:flexible_tree_view/flexible_tree_view.dart'; FlexibleTreeView( nodes: [ TreeNode( data: 'Cities', expanded: true, children: [ TreeNode(data: 'Beijing'), TreeNode(data: 'Shanghai'), TreeNode(data: 'Tokyo'), TreeNode(data: 'Paris') ] ) ], nodeItemBuilder: (context, node) { return Padding( padding: const EdgeInsets.symmetric(vertical: 8), child: Row( children: [ node.hasNodes ? IconButton( iconSize: 12, splashRadius: 16, padding: EdgeInsets.zero, constraints: BoxConstraints.tight(Size(30, 30)), icon: Icon(node.expanded ? Icons.remove : Icons.add), onPressed: () { node.expanded = !node.expanded; }, ) : const SizedBox( width: 12, ), Text( node.data, style: TextStyle( fontSize: 12, color: Colors.black, ), overflow: TextOverflow.ellipsis, ) ], )); }, ) ``` # License See [LICENSE](LICENSE)