effectiveTextStyle method
The theme-level text style for node — textStyleResolver ?? textStyle
for its tier. This is the single resolution rule shared by rendering
(which applies it via Text.style under the ambient DefaultTextStyle)
and measurement (which merges baseTextStyle over it), so a per-node
resolver affects measured width exactly as it affects rendered width.
Implementation
TextStyle? effectiveTextStyle(Node<T> node) {
switch (node.type) {
case NodeType.folder:
return theme.folderTheme.textStyleResolver?.call(node) ??
theme.folderTheme.textStyle;
case NodeType.parent:
return theme.parentTheme.textStyleResolver?.call(node) ??
theme.parentTheme.textStyle;
case NodeType.child:
return theme.childTheme.textStyleResolver?.call(node) ??
theme.childTheme.textStyle;
}
}