copyWith method
Implementation
TreeNode copyWith({
int? id,
String? title,
String? code,
bool? isCheck,
int? hierarchy,
TreeNode? parent,
List<TreeNode>? children,
}) {
return TreeNode(
id: id ?? this.id,
title: title ?? this.title,
code: code ?? this.code,
isCheck: isCheck ?? this.isCheck,
hierarchy: hierarchy ?? this.hierarchy,
parent: parent ?? this.parent,
children: children ?? [],
);
}