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
Annotations

Constructors

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

Properties

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 Offset.zero 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?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The value of this expression.
final
widgetExpr WidgetExpr?
Try to turn this expression into a WidgetExpr.
no setterinherited

Methods

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

Operators

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