RandomUtils class

随机工具类

Constructors

RandomUtils()

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

randInt(int end, {int start = 0}) int
在开始和结束之间生成一个随机数
randomColor() int
生成一个表示十六进制颜色的随机整数
randomElement<T>(List<T> items) → T?
从列表中返回一个随机元素。
randomString(int length) String
生成指定长度或随机长度的随机字符串