item method
Adds a single item to the list.
item can be a string, LipList (for nesting), or any object.
Implementation
LipList item(dynamic item) {
switch (item) {
case null:
break;
case LipList list:
_tree.child(list._tree);
case lip_tree.Tree tree:
_tree.child(tree);
case List<dynamic> items:
for (final it in items) {
this.item(it);
}
case Iterable<dynamic> items:
for (final it in items) {
this.item(it);
}
default:
_tree.child(item.toString());
}
return this;
}