Skip to content
pubscout

list_treeview

0.4.2, released 6 months ago by an unverified publisher

A customizable tree view widget for Flutter built on top of ListView.

WASM-ready
$ flutter pub add list_treeview
Source repository

What it does

ListTreeView manages the tree structure of hierarchical data and lets you design your own row UI using an itemBuilder. It features infinite depth, row recycling through ListView, asynchronous lazy loading, and imperative control via a controller for operations like insert, remove, expand, collapse, and selection.

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

Use it when

  • You need to display hierarchical data in a tree structure with customizable row UI.
  • You require infinite child levels and child nodes with lazy loading capabilities.
  • You want efficient rendering using visible-node recycling via ListView.

Skip it when

  • You are looking for a pre-styled UI kit or material tree component out of the box.

Strengths

  • Bring-your-own-UI approach with a custom item builder.
  • Efficient rendering by recycling visible nodes through ListView.
  • Supports asynchronous lazy loading of child nodes.

Weaknesses

  • Requires managing a separate controller and extending a specific NodeData class.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

not documented

ListTreeView(
  controller: _controller,
  itemBuilder: (BuildContext context, NodeData data) {
    final item = data as TreeNodeData;
    return Padding(
      padding: EdgeInsets.only(left: item.level * 16.0),
      child: ListTile(
        title: Text(item.label ?? ''),
      ),
    );
  },
)

Alternatives

Packages that do the same job and could replace list_treeview.