void printLongString(String text) { finalRegExp pattern = RegExp('.{4,800}');// 800 is the size of each chunk pattern.allMatches(text).forEach((RegExpMatch match) => print(match.group(0))); }