fill function
String
fill(
- String text, {
- int width = 70,
- String initialIndent = '',
- String subsequentIndent = '',
- bool expandTabs = true,
- bool replaceWhitespace = true,
- bool fixSentenceEndings = false,
- bool breakLongWords = true,
- bool dropWhitespace = true,
- bool breakOnHyphens = true,
- int tabSize = 8,
- int maxLines = -1,
- String placeholder = '...',
Fill a single paragraph of text.
Implementation
String fill(
String text, {
int width = 70,
String initialIndent = '',
String subsequentIndent = '',
bool expandTabs = true,
bool replaceWhitespace = true,
bool fixSentenceEndings = false,
bool breakLongWords = true,
bool dropWhitespace = true,
bool breakOnHyphens = true,
int tabSize = 8,
int maxLines = -1,
String placeholder = '...',
}) {
return wrap(text,
width: width,
initialIndent: initialIndent,
subsequentIndent: subsequentIndent,
expandTabs: expandTabs,
replaceWhitespace: replaceWhitespace,
fixSentenceEndings: fixSentenceEndings,
breakLongWords: breakLongWords,
dropWhitespace: dropWhitespace,
breakOnHyphens: breakOnHyphens,
tabSize: tabSize,
maxLines: maxLines,
placeholder: placeholder)
.join('\n');
}