パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.0+2

dynamic_treeview

動的な親/子関係を使用して構築できる動的ツリービューです。無制限のカテゴリ/サブカテゴリリストをサポートし、水平および垂直スクロールに対応しています。

30日間ダウンロード
7
いいね数
47
Pub ポイント
40

パッケージをインストール

flutter pub add dynamic_treeview

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

柔軟な親子関係を備えた動的でインタラクティブなツリー表示を作成するためのFlutterパッケージです。無制限のカテゴリとサブカテゴリの階層構造を構築でき、大規模なデータセットに対応する水平および垂直スクロールをサポートします。ファイルシステム、組織図、製品カテゴリなどのネストされたデータ構造を整理するのに最適です。データの変更に応じてツリーが動的に適応し、スムーズなパフォーマンスと拡張性を確保します。

用途

  • 組織図
  • ファイルシステムのナビゲーション
  • 製品カテゴリーツリー
  • ネストされたデータの表示
  • 動的フィルタリングインターフェース

主な機能

  • 無限のネストレベルをサポート
  • 水平および垂直スクロールのサポート
  • 動的データバインディング
  • カスタマイズ可能なノードスタイル
  • 大規模データセットの効率的なレンダリング

適している対象

  • 階層データを持つアプリケーション
  • 展開リストを必要とする複雑なUI
  • データ集約型アプリケーション
  • カスタムツリー基準のナビゲーション
  • スケーラブルな UI コンポーネント

注意事項

  • 慎重な状態管理が必要です
  • 非常に深いツリーではパフォーマンスが低下する可能性があります
  • 制限されたプラットフォーム固有の最適化
  • 組み込みの検索/フィルタ機能なし
  • アニメーション用のカスタム実装が必要です

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

dynamic_treeview - A flutter package

A Dynamic treeview that can be build using dynamic parent/child relationship. It supports indefinite category/subcategory lists with horizontal and vertical scrolling

Getting Started

In your flutter project add the dependency:

    dependencies:
        ...
        dynamic_treeview: 1.0.0+2

Import package

import 'package:dynamic_treeview/dynamic_treeview.dart';

BaseModel implementation

    Since DynamicTreeView is build using data having parent/child relationship, 
    you must create a class model that implements BaseModel and overrides the method 
    like getParentId(), getId() and getTitle() and return appropriate values to make it work. 
    The method getExtraData() has also been added just in-case if any extra data is needed when child/parent is tapped.

Sample Usage

    DynamicTreeView(
        data: getData(), // pass here List<BaseModel>
        config: Config(
            parentTextStyle:
                TextStyle(color: Colors.black, fontWeight: FontWeight.w600),
            rootId: "1",
            parentPaddingEdgeInsets:
                EdgeInsets.only(left: 16, top: 0, bottom: 0)),
        onTap: (m) {
        //action on tap
        },
        width: MediaQuery.of(context).size.width,
    )

Constructor parameters

    data                -   List<BaseData> .TreeView will be build based on this data.This is a required field
    config              -   Various Configuration options
    onTap               -   Callback when tapped on parent/child widget

Configuration parameters

    parentTextStyle                 -   Parent tile TextStyle
    parentPaddingEdgeInsets         -   Parent tile padding
    childrenTextStyle               -   Child tile TextStyle
    childrenPaddingEdgeInsets       -   Children tile padding

Check the Config class in dynamic_treeview.dart file for details.

Sample code

Please check example for details.

Screenshots

Full Screen

alt text

Drawer

alt text

MIT LICENSE
I spent weeks of my time developing this package. I really hope this saves you loads of time and i'd be glad to hear your feedback.Let me know if you find any bugs/issues.Thanks.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。