extras library
Functions
-
createParagraph(
{int numSentences = -1, int numParagraphs = 1}) → String - Creates random paragraphs.
-
createSentence(
{int sentenceLength = -1, int numSentences = 1}) → String - Creates random sentences.
-
createText(
{int numParagraphs = -1, int numSentences = -1}) → String - Creates a text comprised of a number of paragraphs.
-
createWord(
{int count = 1}) → String -
Creates
count
number of random words. -
makeFakes<
T> ({required ThingGenerator< T> factory, int count = 20}) → List<T> -
Generates a non-growable
count
sized list of the items returned byfactory
. -
randomBool(
) → bool - Generates a random bool value.
-
randomId(
[int length = 12]) → String -
Generates a random alpha-numeric ascii encoded value of
the specified
length
(defaults to12
). -
randomInt(
int min, int max) → int -
Generates a random integer between
min
andmax
.
Typedefs
- RandomBool = bool Function()
- The shape of a bool producing function.
- RandomNumber = int Function(int min, int max)
- The shape of a number producing function.
-
ThingGenerator<
T> = T Function(int index, RandomNumber random, RandomBool yesOrNo) -
The shape of a
T
producing function.