expandable_tree_menu 0.1.0-dev.3 copy "expandable_tree_menu: ^0.1.0-dev.3" to clipboard
expandable_tree_menu: ^0.1.0-dev.3 copied to clipboard

outdated

Tree of menu-nodes that can be expanded/collapsed to review more menu nodes, built from a recursive list of nodes.

expandable_tree_menu #

Builds a Tree of Sub-menus that can be expanded/collapsed, where each node can recursively contain another tree, using a recursive list of "Nodes".

Demo

Each Node has a value payload that will be passed to the onSelect handler.

Nodes are rendered using a nodeBuilder which will use the value of the node.

ExpandableTree(
    nodes: [
     TreeNode('Category A', subNodes: [
       TreeNode('CatA first item'),
       TreeNode('CatA second item'),
     ]),
     TreeNode('Category B', subNodes: [
       TreeNode('Cat B first item'),
       TreeNode('Cat B sub-category 1', subNodes: [
         TreeNode('Cat B1 first item'),
         TreeNode('Cat B1 second item'),
         TreeNode('Cat B1 third item'),
         TreeNode('Cat B1 final item'),
       ]),
     ]),
   ],
    nodeBuilder: (context, nodeValue) => Card(child: Text(nodeValue.toString()),
    onSelect: (node) => _nodeSelected(context, node),
  ), 
50
likes
0
pub points
74%
popularity

Publisher

unverified uploader

Tree of menu-nodes that can be expanded/collapsed to review more menu nodes, built from a recursive list of nodes.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on expandable_tree_menu