repeat method
Repeats this string times times, joined by separator.
'ab'.repeat(3, separator: '-') // 'ab-ab-ab'
Implementation
String repeat(int times, {String separator = ''}) {
if (times <= 0) return '';
return List.filled(times, this).join(separator);
}