copyWith method

Node<NodeType, IdType> copyWith({
  1. NodeType? data,
  2. IdType? id,
  3. String? name,
})

Implementation

Node<NodeType, IdType> copyWith({
  NodeType? data,
  IdType? id,
  String? name,
}) {
  return Node<NodeType, IdType>(
    data: data ?? this.data,
    id: id ?? this.id,
    name: name ?? this.name,
  );
}