Utils class

Utils 工具类

Constructors

Utils()

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

capitalize(String val) String
首字母大写
debounce(Function fn, {int delay = 300, bool immediate = false}) Function
函数防抖
indexWhere(List list, bool condition(dynamic), {bool needReset = false}) int
查找索引
isBlank(dynamic val) → dynamic
数据为空
isNotNullOrBlank(dynamic val) bool
数据不为 空 & Null
isNullOrBlank(dynamic val) bool
数据为 空 & Null
removeDecimal(String val) String
去除小数点
throttle(Function fn, {int delay = 300, bool leading = true, bool trailing = true}) Function
函数节流
tryParse<T>(dynamic val) → dynamic
检查数字或字符串