repeat method

List<T> repeat(
  1. int times
)

Implementation

List<T> repeat(int times) {
  final List<T> items = [];
  for (int i = 0; i < times; i++) {
    items.addAll(this);
  }
  return items;
}