패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.0+2

dynamic_treeview

동적 부모/자식 관계를 사용하여 구축할 수 있는 동적 트리뷰입니다. 수평 및 수직 스크롤을 지원하는 무제한 카테고리/하위 카테고리 목록을 지원합니다.

30일 다운로드
7
좋아요
47
Pub 점수
40

패키지 설치

flutter pub add dynamic_treeview

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

유연한 부모-자식 관계를 지원하는 동적이고 상호작용 가능한 트리 뷰를 생성하기 위한 플러터 패키지입니다. 무제한의 카테고리 및 하위 카테고리 계층 구조를 구축할 수 있으며, 대규모 데이터셋에 대한 수평 및 수직 스크롤을 지원합니다. 파일 시스템, 조직도 또는 제품 카테고리와 같은 중첩된 데이터 구조를 정리하는 데 이상적입니다. 트리는 데이터 변경에 따라 동적으로 적응하여 원활한 성능과 확장성을 보장합니다.

사용 사례

  • 조직도
  • 파일 시스템 탐색
  • 제품 카테고리 트리
  • 중첩된 데이터 표시
  • 동적 필터링 인터페이스

주요 기능

  • 무한 중첩 레벨을 지원합니다
  • 수평 및 수직 스크롤 지원
  • 동적 데이터 바인딩
  • 사용자 정의 노드 스타일
  • 대규모 데이터셋에 대한 효율적인 렌더링

적합한 대상

  • 계층적 데이터를 가진 앱
  • 확장 가능한 목록이 필요한 복잡한 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.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.