selectedIndex property

int get selectedIndex

The index of the currently selected node in the flattened tree.

Implementation

int get selectedIndex => _selectedIndex;
set selectedIndex (int val)

Sets the index of the currently selected node and clamps it to valid bounds.

Implementation

set selectedIndex(int val) {
  if (_flatNodes.isNotEmpty) {
    _selectedIndex = val.clamp(0, _flatNodes.length - 1);
  }
}