tree_view_flutter 1.0.2 copy "tree_view_flutter: ^1.0.2" to clipboard
tree_view_flutter: ^1.0.2 copied to clipboard

A Flutter package for a fully customisable base tree view. Using this package you can build nested tree view with the possibility of making each child widget a parent.

pub package Build Status License: MIT

Tree View #

A Flutter package for a fully customisable tree view

Sample

Installing #

Add this to your pubspec.yaml file

dependencies:
  tree_view_flutter: ^1.0.2

And run

flutter packages get

Example #

Let's assume we want to show a tree view with this structure:

Desktop
|-- documents
|   |-- Resume.docx
|   |-- Billing-Info.docx
|-- MeetingReport.xls
|-- MeetingReport.pdf
|-- Demo.zip

In this example

  1. Resume.docx and Billing-Info.docx are Child widgets with documents as the Parent.
  2. documents, MeetingReport.xls, MeetingReport.xls and Demo.zip are Child widgets with Desktop as a Parent widget.

The TreeView would look like this


var treeView = TreeView(
  parentList: [
    Parent(
      parent: Text('Desktop'),
      childList: ChildList(
        children: <Widget>[
          Parent(
            parent: Text('documents'),
            childList: ChildList(
              children: <Widget>[
                Text('Resume.docx'),
                Text('Billing-Info.docx'),
              ],
            ),
          ),
          Text('MeetingReport.xls'),
          Text('MeetingReport.pdf'),
          Text('Demo.zip'),
        ],
      ),
    ),
  ],
);

📃 License #

Copyright (c) 2024 Asad Khan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
4
likes
160
points
95
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for a fully customisable base tree view. Using this package you can build nested tree view with the possibility of making each child widget a parent.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on tree_view_flutter