ValueExpr class Null safety

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.
read-only
asDate DateTime
Convert this value to a DateTime or return DateTime.fromMillisecondsSinceEpoch(0) if it is not a DateTime.
read-only
asNum num
Convert this value to a num or return 0 if it is not a num.
read-onlyoverride
asOffset Offset
Convert this value to an Offset or return Offset.zero if it is not an Offset.
read-only
hashCode int
The hash code for this object.
read-onlyoverride
isBool bool
Whether this value is a bool.
read-only
isDate bool
Whether this value is a DateTime.
read-only
isEmpty bool
Whether this value is empty.
read-only
isNum bool
Whether this value is a num.
read-only
isOffset bool
Whether this value is an Offset.
read-only
retry bool
Should this expression be re-evaluated if something goes wrong?
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
value String
The value of this expression.
final
widgetExpr WidgetExpr?
Try to turn this expression into a WidgetExpr.
read-onlyinherited

Methods

compareTo(dynamic other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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