repeat method

String repeat(
  1. int times
)

Repeats the string times number of times.

Example:

print('abc'.repeat(3)); // Output: 'abcabcabc'

Implementation

String repeat(int times) => List.filled(times, this).join();