Skip to content
pubscout

animated_tree_view

2.3.0, released 2 years ago by cubivue.com

A hierarchical tree view widget with animations, based on AnimatedList.

WASM-ready
$ flutter pub add animated_tree_view
Source repository

What it does

Visualizes hierarchical tree data structures as linear list views using AnimatedList and SliverAnimatedList. Supports infinite nesting levels, node expansion and collapse animations, customizable indentation, and tree diffing.

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

Use it when

  • You need to display hierarchical or tree-structured data in your Flutter app.
  • You want smooth expand and collapse animations for nested tree nodes.
  • You require support for both standard lists and slivers.

Skip it when

  • You only need a flat, non-nested list view (use standard ListView or AnimatedList instead).
  • You need extremely complex indexed node operations on large datasets where O(n^m) traversal cost becomes a bottleneck.

Strengths

  • Supports infinite levels and child nodes with built-in expansion animations.
  • Offers both standard (TreeView) and sliver (SliverTreeView) variants.
  • Includes Tree Diff Util to automatically apply changes when the underlying tree updates.

Weaknesses

  • Indexed tree variants have an expensive traversal complexity of O(n^m).
  • Requires specific controller setup (AutoScrollController) for certain expansion behaviors in slivers.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
4

not documented

TreeView.simple(
    tree: TreeNode.root(),
    builder: (context, node) {
        return ListTile(
          title: Text("Item ${node.level}-${node.key}"),
          subtitle: Text('Level ${node.level}'),
        );
    },
)

Alternatives

Packages that do the same job and could replace animated_tree_view.

Works with

Packages commonly used together with animated_tree_view: ones it builds on, ones built on it, and its own family.