TreeRowInfo class

A row backed by one item of the data source. A row's place in a tree.

One object rather than three fields on DataGridRow, and null for the flat and grouped cases. A grouped 50k-row grid allocates a DataGridRow per visible row every time anything changes, and an ungrouped one builds them on every read, so what those objects cost to construct is a measurable part of a group toggle. A tree pays one small allocation per row it actually nests; everything else pays one null field.

Constructors

TreeRowInfo({required String path, required bool hasChildren, required bool expanded, bool loading = false})
const

Properties

expanded → bool
Whether this row's children are shown.
final
hasChildren → bool
Whether this row has rows of its own beneath it.
final
hashCode → int
The hash code for this object.
no setterinherited
loading → bool
Whether the grid is waiting for this row's children.
final
path → String
Identity of this row within the tree, built from its ancestors' keys.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited