words method

List<String> words({
  1. int nWords = 10,
})
inherited

Generates fake lists words. Example:

faker.words(2) // [lorem, ipsum]

Implementation

List<String> words({int nWords = 10}) {
  if (nWords < 0) return <String>[];
  return <String>[for (int i = 0; i < nWords; i++) wordList.random];
}