splitLine method
Split this String, that is a single long line, without any linebreaks
into multiple Strings with a maximum length of maxLength
.
The length of a line may be more than maxLength
, if the long line has
no whitespaces that allow it to be split into multiple lines.
This line is split where a whitespace is.
Implementation
List<String> splitLine(int maxLength) {
return split("\n")
.map((e) => e._splitLineImpl(maxLength))
.expand((element) => element)
.toList();
}