effectiveTextStyle method

TextStyle? effectiveTextStyle(
  1. Node<T> node
)

The theme-level text style for nodetextStyleResolver ?? 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;
  }
}