plus method

List<num> plus(
  1. List<num> other
)

Element-wise sum with other.

Prefer this over the + operator: List defines its own operator + (concatenation), which shadows the extension operator below.

Implementation

List<num> plus(List<num> other) {
  return List.generate(length, (i) => this[i] + other[i]);
}