copyWith method
Creates a copy of this node with updated attributes.
Implementation
TTreeNode<T> copyWith({
String? key,
String? label,
T? data,
dynamic icon,
dynamic expandedIcon,
List<TTreeNode<T>>? children,
bool? isLeaf,
bool? isLoading,
String? badge,
Widget? trailing,
bool? isSelectable,
bool? isDisabled,
}) {
return TTreeNode<T>(
key: key ?? this.key,
label: label ?? this.label,
data: data ?? this.data,
icon: icon ?? this.icon,
expandedIcon: expandedIcon ?? this.expandedIcon,
children: children ?? this.children,
isLeaf: isLeaf ?? this.isLeaf,
isLoading: isLoading ?? this.isLoading,
badge: badge ?? this.badge,
trailing: trailing ?? this.trailing,
isSelectable: isSelectable ?? this.isSelectable,
isDisabled: isDisabled ?? this.isDisabled,
);
}