Skip to content
pubscout

flutter_fancy_tree_view2

2.0.0, released 10 days ago by an unverified publisher

Widgets and slivers for rendering hierarchical tree structures and handling drag-and-drop.

WASM-readyUses material_ui
$ flutter pub add flutter_fancy_tree_view2
Source repository

What it does

Provides a collection of widgets and slivers to bring hierarchical data to life. It traverses data in depth-first order to lazily render tree nodes with customizable indentation guides, animations, and drag-and-drop support.

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

Use it when

  • You need to display hierarchical file systems or directory trees in Flutter.
  • You want expandable and collapsible tree views with custom indentation lines.
  • You require tree nodes with drag-and-drop reordering capabilities.

Skip it when

  • You are using Flutter's built-in Material library directly without migrating to material_ui.
  • You don't have hierarchical or nested data structures to display.

Strengths

  • Supports indentation guides, connect lines, and expand/collapse animations.
  • Includes rudimentary drag-and-drop support with auto-scrolling and auto-expanding nodes.
  • Efficiently renders tree nodes using slivers.

Weaknesses

  • Requires migration to the standalone material_ui package in version 2.0.
  • Major breaking changes compared to older 1.x versions.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Requires adding material_ui: ^1.11.0 to dependencies and importing material_ui.dart instead of flutter/material.dart.

final treeController = TreeController<MyTreeNode>(
  roots: roots,
  childrenProvider: (MyTreeNode node) => node.children,
);

AnimatedTreeView<MyTreeNode>(
  treeController: treeController,
  nodeBuilder: (BuildContext context, TreeEntry<MyTreeNode> entry) {
    return InkWell(
      onTap: () => treeController.toggleExpansion(entry.node),
      child: TreeIndentation(
        entry: entry,
        child: Text(entry.node.title),
      ),
    );
  },
)

Alternatives

Packages that do the same job and could replace flutter_fancy_tree_view2.

  • sliver_dashboard

    Smooth, sliver-based drag and resize grid engine for Flutter dashboards.

  • paging_view

    Flutter widgets for infinite‑scroll, paginated lists, grids and slivers with data‑source control.

  • flutter_json

    Renders valid JSON as an interactive hierarchical tree structure with lazy loading.

  • any_link_preview

    A Flutter widget that fetches and displays web link previews with customization and caching.

Works with

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