RandomProvider class

A utility class for generating random values.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

integer({int max = 100, int min = 0, int? seed}) int
Generates a random integer within the specified range.
list<T>(Iterable<T> data, {int? length, int min = 0, int? seed}) List<T>
Generates a list of random values from the provided list.
randomize<T>(Iterable<Iterable<T>> root, {int? length, List<T> initial = const [], T converter(int index, T old)?}) List<T>
Randomly selects elements from multiple lists while ensuring uniqueness.
string(String data, {int? max, int? seed}) String
Generates a random string of specified length from the given character set.
value<T>(Iterable<T> data, {int? max, int min = 0, int? seed}) → T?
Retrieves a random value from the provided list.