TreeEnumeratorStyleFunc typedef
Callback for per-item enumerator (branch character) styling in trees.
children is the list of sibling items at the current level.
index is the index of the current item being rendered.
Return a Style to apply to the enumerator, or null for no styling.
Example:
tree.enumeratorStyleFunc((children, index) {
if (index == selectedIndex) {
return Style().foreground(Colors.green);
}
return Style().foreground(Colors.dim);
});
Implementation
typedef TreeEnumeratorStyleFunc =
Style? Function(List<dynamic> children, int index);