EZ class

Generic utilities.

Constructors

EZ()

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

boolify(dynamic value) bool
Returns the truthy value of value, or throws an exception.
boolifyOrNull(dynamic value) bool?
If value is null - returns null. Otherwise - returns its truthy value (using EZ.boolify).
ceil<T extends num>(num n) → T
Rounds n to the closest largest integer. The returned value is of the same type as n.
floor<T extends num>(num n) → T
Rounds n to the closest smaller integer. The returned value is of the same type as n.
isEmpty(dynamic value) bool
Returns true if value is null, an empty String, or an empty Iterable.
removeWhitespaces(String s) String
Removes all whitespaces from s (using the "\s" regexp).
round<T extends num>(num n, [int precision = 0]) → T
Rounds n to a precision of precision. The returned value is of the same type as n.
tryBoolify(dynamic value) bool?
Returns the truthy value of value (refer to EZ.boolify for details) or null, if the truthy value cannot be figured out (i.e. instead of throwing an exception like EZ.boolify does).