ValueExpr class

A value expression. Honey only knows a single type of value: String. It converts it to the appropriate type when needed.

Implemented types
Mixed in types


ValueExpr(dynamic value, {bool retry = false})
Create a value expression from the given value.
ValueExpr.empty({bool retry = false})
Creates an empty value expression.


asBool bool
Convert this value to a bool or return false if it is not a bool.
no setter
asDate DateTime
Convert this value to a DateTime or return DateTime.fromMillisecondsSinceEpoch(0) if it is not a DateTime.
no setter
asNum num
Convert this value to a num or return 0 if it is not a num.
no setteroverride
asOffset Offset
Convert this value to an Offset or return if it is not an Offset.
no setter
hashCode int
The hash code for this object.
no setteroverride
isBool bool
Whether this value is a bool.
no setter
isDate bool
Whether this value is a DateTime.
no setter
isEmpty bool
Whether this value is empty.
no setter
isNum bool
Whether this value is a num.
no setter
isOffset bool
Whether this value is an Offset.
no setter
retry bool
Should this expression be re-evaluated if something goes wrong?
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The value of this expression.
widgetExpr WidgetExpr?
Try to turn this expression into a WidgetExpr.
no setterinherited


compareTo(dynamic other) int
Compares this object to another object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
property(String name) EvaluatedExpr
Get the name property of this expression.
toDisplayString() String
Generate a display string for this expression.
toString() String
A string representation of this object.
withRetry(bool retry) ValueExpr
Copy this expression with the given retry value.


operator ==(Object other) bool
The equality operator.