packages

Flutter tree select widget.

Screenshot

flutter_tree

Usage

To use this plugin, add flutter_tree_pro as a dependency in your pubspec.yaml file.

dependencies:
  flutter_tree_pro: ^0.0.3

Use as a widget

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Flutter tree pro')),
      body: Container(
        child: FlutterTree(
          listData: treeListData,
          initialListData: initialTreeData,
          config: Config(
            parentId: 'parentId',
            dataType: DataType.DataList,
            label: 'value',
          ),
          onChecked: (List<Map<String, dynamic>> checkedList) {},
        ),
      ),
    );
  }

Property

propertydescription
listDataThe data source
initialListDataThe initial data source
parentIdThe key name of parent id
dataTypeThe type of data source
labelThe key name of the value
onCheckedThe item checked callback function

Libraries

data_util
flutter_tree_pro
@date: 2022/3/3 15:32 @author: kevin @description: dart
packages
util