copyWith method

TreeNode copyWith({
  1. String? id,
  2. String? label,
  3. IconData? iconData,
  4. Color? iconColor,
  5. bool? isFolder,
  6. bool? isExpanded,
  7. bool? isSelected,
  8. List<TreeNode>? children,
  9. dynamic data,
  10. NodeStateMode? stateMode,
})

Implementation

TreeNode copyWith({
  String? id,
  String? label,
  IconData? iconData,
  Color? iconColor,
  bool? isFolder,
  bool? isExpanded,
  bool? isSelected,
  List<TreeNode>? children,
  dynamic data,
  NodeStateMode? stateMode,
}) {
  return TreeNode(
    id: id ?? this.id,
    label: label ?? this.label,
    iconData: iconData ?? this.iconData,
    iconColor: iconColor ?? this.iconColor,
    isFolder: isFolder ?? this.isFolder,
    isExpanded: isExpanded ?? this.isExpanded,
    isSelected: isSelected ?? this.isSelected,
    children: children ?? this.children,
    data: data ?? this.data,
    stateMode: stateMode ?? this.stateMode,
  );
}