randBody function

List<String> randBody({
  1. WordLanguage? language,
  2. int count = 1,
  3. RandRealism realism = RandRealism.real,
  4. RandVocabulary vocabulary = RandVocabulary.full,
  5. int? minLength,
  6. int? maxLength,
  7. String? startsWith,
  8. bool unique = false,
  9. Random? random,
})

The parts of a body, inside and out.

randWord with the theme already chosen; every other parameter is the same. For the detail form, pass WordTheme.body to randWordDetails — Dart has no overloads, and a second function per theme would be a second wall of them.

randBody(language: WordLanguage.ko, count: 3); // [손목, 어깨, 심장]
randBody(language: WordLanguage.en, count: 3); // [Wrist, Shoulder, Heart]

Implementation

List<String> randBody({
  WordLanguage? language,
  int count = 1,
  RandRealism realism = RandRealism.real,
  RandVocabulary vocabulary = RandVocabulary.full,
  int? minLength,
  int? maxLength,
  String? startsWith,
  bool unique = false,

  /// Where the randomness comes from: `Random.secure()` for a value nobody may
  /// predict, `Random(42)` for one that has to come out the same every run.
  Random? random,
}) => randWord(
  language: language,
  theme: WordTheme.body,
  count: count,
  realism: realism,
  vocabulary: vocabulary,
  minLength: minLength,
  maxLength: maxLength,
  startsWith: startsWith,
  unique: unique,
  random: random,
);