RandomGenerator class

Constructors

RandomGenerator()
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

amount(dynamic fn(int i), int max, {int min: 1}) List
Generates a list of random length filled by return value of fn. [...]
boolean() bool
Generates a random boolean.
decimal({num scale: 1, num min: 0}) double
Generates a random decimal. Accepts a scale and a min value.
element<T>(List<T> list) → T
Plucks a random element from the given list.
fromPattern(List pattern) String
Generates a random set of numbers from the given pattern. [...]
fromPatternToHex(List pattern) String
Generates a random set of numbers from the given pattern. Returns this pattern as hex. [...]
integer(int max, {int min: 0}) int
Generates a random integer with the given max value and to the lowest min value if provided. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
numbers(num max, num times) List<int>
Generates a random number from the max value and by the number of times. [...]
string(int max, {int min: 1}) String
Generates a random string with the given max value and to the lowest min value if provided. [...]
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited