operator * method

List<T> operator *(
  1. int times
)

Repeats the contents of this list the given number of times.

Implementation

List<T> operator *(int times) {
  final section = [...this];
  for (var i = 0; i < times; i++) {
    addAll(section);
  }

  return this;
}