repeatValue<T> function

List<T> repeatValue<T>(
  1. T value,
  2. int n
)

Returns a list containing value repeated n times.

Example:

repeatValue('x', 3); // ['x', 'x', 'x']

Implementation

List<T> repeatValue<T>(T value, int n) => List<T>.filled(n, value);