IsTruthy class
Checks if the element in question is truthy. The following are falsey:
- a non-empty string
- a non-empty list
- a non-empty map
- any number other than 0
- true
- any object other than Error
- any object other than Exception
- any object other thatn null
- Inheritance
-
- Object
- Constraint
- IsTruthy
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
The key on which the constraint should be applied on
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → dynamic
-
the value that is used when evaluating the constraint
finalinherited
Methods
-
evaluate(
JSON payload) → bool -
Check if the payload satisfies the Constraint
override
-
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