Rnd class
Constructors
- Rnd()
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 Properties
Static Methods
-
getBool(
[double chance = 0.5]) → bool -
Gets a random boolean with chance
chance
. -
getDouble(
double min, double max) → double -
Gets a random double between
min
andmax
. -
getInt(
int min, int max) → int -
Gets a random int between
min
andmax
. -
getItem(
List list) → dynamic - Randomly selects an item from a list.
-
getPalette(
List< Palette> ? palettes, bool dark) → Palette - Gets a random palette from a list of palettes and sorts its' colors by luminance.
-
shuffle(
List list) → List - Randomize the positions of items in a list.