TreeStyleFunc typedef

TreeStyleFunc = Style? Function(String item, int depth, bool isDirectory)

Callback for per-item styling in trees.

item is the item being rendered (the label/name). depth is the nesting depth (0 for root level). isDirectory indicates if the item has children.

Return a Style to apply to the item, or null for no styling.

Implementation

typedef TreeStyleFunc = Style? Function(
  String item,
  int depth,
  bool isDirectory,
);