Skip to content
pubscout

expandable_tree_menu

0.1.0-dev.5, released 6 years ago by an unverified publisher

Tree menu widget with expandable/collapsible nodes

WASM-ready
$ flutter pub add expandable_tree_menu
Source repository

What it does

Provides a recursive tree of menu nodes that can be expanded or collapsed. Each node can contain sub‑nodes and a custom widget is built for each node via a builder callback.

AI-written summary of version 0.1.0-dev.5, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Building nested navigation menus
  • Need a highly customizable tree structure
  • Want to use custom widgets for each node
  • Require control over twisty position and colors

Skip it when

  • You need asynchronous loading of nodes from a network source
  • You need complex state management beyond simple UI interactions

Strengths

  • Extensive customization options (colors, decorations, twisty widget)
  • Supports arbitrary depth via recursive TreeNode
  • Simple API with nodeBuilder and onSelect callbacks

Weaknesses

  • No built‑in support for async data loading
  • Limited documentation on performance with large trees
  • No example of integration with state management libraries

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
```dart
ExpandableTree(
  nodes: [
    TreeNode('Category A', subNodes: [TreeNode('Item 1'), TreeNode('Item 2')]),
    TreeNode('Category B', subNodes: [TreeNode('Item 3')]),
  ],
  nodeBuilder: (ctx, value) => Card(child: Text(value.toString())),
  onSelect: (node) => print('Selected: $node'),
)
```

Alternatives

Packages that do the same job and could replace expandable_tree_menu.