sentence function

TValueGenerator sentence({
  1. required Random random,
  2. int wordCount = 8,
})

Returns a generator that produces a lowercase lorem sentence of wordCount words on each call.

Throws ArgumentError if wordCount is less than 1.

Implementation

TValueGenerator sentence({
  required Random random,
  int wordCount = 8,
}) {
  _requirePositive(wordCount, 'wordCount');
  return () => _generateWords(random, wordCount);
}