updateState method
Implementation
@override
TreeItem<T> updateState({
bool? expanded,
bool? selected,
}) {
return TreeItem(
data: data,
children: children,
expanded: expanded ?? this.expanded,
selected: selected ?? this.selected,
);
}