Skip to main content

tree_data_model 0.0.1 copy "tree_data_model: ^0.0.1" to clipboard
tree_data_model: ^0.0.1 copied to clipboard

tree data structure

A model representing tree structure.

Features #

  • recursively defined
  • JSON serializable
  • infinitely extensible
  • crud leaf
  • crud node

Usage #

typedef TaskList = Tree<Task, Header>;
typedef Task = Leaf<Task, Header>; 
typedef Folder = Node<Task, Header>;

final TaskList todos =
    Folder(id: 'todos', value: Header(title: 'Todays todo'), subTrees: [
  Folder(
    id: 'exercise',
    value: Header(
      title: 'Exercise',
      description: 'For brain Helthy',
    ),
    subTrees: [
      Task(id: 'running_task', value: Task(title: 'Running', completed: false)),
      Task(id: 'squat_task', value: Task(title: 'Squat', completed: false)),
    ],
  ),
  Task(id: 'study_math_task', value: Task(title: 'Study math', completed: false))
]);
0
likes
120
points
11
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

tree data structure

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, uuid

More

Packages that depend on tree_data_model