Rand class final

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

alias() String
Text
article([int? size]) String
Aggregates size number of paragraph()
boolean([double trueChance = 50]) bool
bytes(int size, [bool secure = false]) Uint8List
char() int
Returns a character using non-secure math.Random
charSecure() int
Returns a character using secure math.Random.secure
city() String
Miscellaneous
dateTime([DateTime? a, DateTime? b]) DateTime
microsecondsSinceEpoch based random DateTime generator a/b parameters defines the limits, the order doesn't matter
dateTimeYear(int a, int b) DateTime
Random local date between 01/01/a and 01/01/b
duration(Duration a, [Duration b = Duration.zero]) Duration
Time/Duration
element<T>(Iterable<T> iterable) → T
Collection
firstName() String
float([num max = double.maxFinite, num min = 0]) double
min/max is inclusive
fullName() String
id([int length = 16]) String
base62 based id
integer([int max = _maxInt - 1, int min = 0]) int
Numeric
lastName() String
latitude([int precision = 5]) double
precision is the number of digits after the decimal point
longitude([int precision = 5]) double
precision is the number of digits after the decimal point
mapEntry<K, V>(Map<K, V> map) MapEntry<K, V>
mapKey<K, V>(Map<K, V> map) → K
mapValue<K, V>(Map<K, V> map) → V
nonce(int len) String
Cryptographic
nullable<T>(T value, [double nullChance = 50]) → T?
Generic
paragraph([int? size]) String
Aggregates size number of random lorem ipsum sentences
password({int length = 12, bool withLowercase = true, bool withUppercase = true, bool withNumeric = true, bool withSpecial = true}) String
Cryptographically secure password generator length is the length of the password withLowercase is the flag to include lowercase characters withUppercase is the flag to include uppercase characters withNumeric is the flag to include numeric characters withSpecial is the flag to include special characters
seed(int seed) → void
sentence() String
Returns a random lorem ipsum sentence
subSet<T>(Iterable<T> pool, int size) Set<T>
weightedRandomizedArray<T>({required List<int> weights, required List<T> pool, required int size, bool secure = false}) List<T>
Probability
word() String
Returns a random lorem ipsum word
words({int? count, String separator = ' '}) String
Aggregates count number of random lorem ipsum words

Constants

base62 → const String