expand method

bool expand(
  1. String id
)

Expands one branch.

Implementation

bool expand(String id) {
  final item = _findItem(id);
  if (item == null || !item.hasChildren || _expandedIds.contains(id)) {
    return false;
  }
  final selectedId = selectedItem?.id;
  _expandedIds.add(id);
  _restoreSelection(id, selectedId: selectedId);
  return true;
}