wrap method
Reformat the single paragraph in text
so it fits in lines of no more
than width columns, and return a list of wrapped lines.
Implementation
List<String> wrap(String text) {
var chunks = splitChunks(text,
breakOnHyphens: breakLongWords,
expandTabs: expandTabs,
tabSize: tabSize,
replaceWhitespace: replaceWhitespace);
if (fixSentenceEndings) {
fixEndings(chunks);
}
return wrapChunks(chunks,
width: width,
initialIndent: initialIndent,
subsequentIndent: subsequentIndent,
breakLongWords: breakLongWords,
dropWhitespace: dropWhitespace,
breakOnHyphens: breakOnHyphens,
maxLines: maxLines,
placeholder: placeholder);
}