searchAllTreesWithTitleDFS<T extends AbsNodeType> function
void
searchAllTreesWithTitleDFS<T extends AbsNodeType>()
Using DFS to return all the trees if each of root's data contains searching text
Implementation
void searchAllTreesWithTitleDFS<T extends AbsNodeType>(
TreeType<T> tree, String text, List<TreeType<T>> result) {
if (tree.data.isUnavailable) return;
if (tree.data.title.contains(text)) result.add(tree);
for (var child in tree.children) {
searchAllTreesWithTitleDFS(child, text, result);
}
}