createText static method
Creates a text comprised of a number of paragraphs.
Each text is comprised of numParagraphs
paragraphs, each of which
contain numSentences
sentences. If either parameter is omitted, a
random number is generated.
Implementation
static String createText({int numParagraphs = -1, int numSentences = -1}) {
List<String> paragraphs = [];
if (numParagraphs < 0) {
numParagraphs = _randomInt(3, 7);
}
for (var i = 0; i < numParagraphs; i++) {
paragraphs.add(createParagraph(numSentences: numSentences));
}
return paragraphs.getRange(0, paragraphs.length).join("\n");
}