copyWith<T> method
Creates a copy of this controller but with the given fields replaced with the new values.
Implementation
TreeViewController copyWith<T>({List<Node<T>>? children, String? selectedKey}) {
return TreeViewController(
children: children ?? this.children,
selectedKey: selectedKey ?? this.selectedKey,
);
}