merge method

List<Node<T>> merge(
  1. List<Node<T>> other
)

Implementation

List<Node<T>> merge(List<Node<T>> other) {
  if (identical(this, other)) return toList();

  if (isEmpty) {
    return other.isEmpty ? [] : other.toList();
  } else if (other.isEmpty) {
    return toList();
  }

  var merge = {...this, ...other}.toList();
  return merge;
}