RowMetrics<T> class
Single source of truth for a row's layout geometry and effective text style.
Both measurement (SizeService-driven width precompute) and rendering
(NodeWidget) read their facts from here, so measured width and rendered
width cannot drift apart. Build one per layout pass from the already-scaled
theme; baseTextStyle (the ambient Theme.of(context).textTheme.bodyMedium)
is only needed for measurement.
Constructors
-
RowMetrics({required FlutterFolderViewTheme<
T> theme, TextStyle? baseTextStyle})
Properties
- baseTextStyle → TextStyle?
-
final
- expandStripWidth → double
-
Width of the expand/collapse strip (icon box) — one indent unit.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
theme
→ FlutterFolderViewTheme<
T> -
final
Methods
-
effectiveTextStyle(
Node< T> node) → TextStyle? -
The theme-level text style for
node—textStyleResolver ?? textStylefor its tier. This is the single resolution rule shared by rendering (which applies it viaText.styleunder the ambientDefaultTextStyle) and measurement (which merges baseTextStyle over it), so a per-node resolver affects measured width exactly as it affects rendered width. -
iconBoxWidth(
NodeType type) → double - Width of the tier icon box (icon width plus its horizontal padding/margin).
-
indentWidth(
int depth) → double -
Horizontal indentation for a node at
depth: one expand strip per level. -
maxWidth(
List< Node< nodes) → doubleT> > - Widest row across the whole tree (all descendants, regardless of expand state) plus the left content padding — a stable width independent of which nodes are currently expanded.
-
measureNodeWidth(
Node< T> node, int depth) → double - Total width of a single row: indent + own expand strip + tier icon box + measured label + right content padding. Uses baseTextStyle merged with effectiveTextStyle so the measured label matches what is rendered.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited