copyWith method
Implementation
TListItem<T, K> copyWith({
T? data,
K? parentKey,
List<K>? childrenKeys,
int? level,
}) {
return TListItem<T, K>(
key: key,
data: data ?? this.data,
parentKey: parentKey ?? this.parentKey,
childrenKeys: childrenKeys ?? this.childrenKeys,
level: level ?? this.level,
);
}