CodeExpression class Null safety

Represents a Code block as an Expression.

Inheritance

Constructors

CodeExpression(Code code)
INTERNAL ONLY: Used to wrap Code as an Expression.
const

Properties

awaited Expression
This expression preceded by await.
read-onlyinherited
code Code
The expression as a valid Code block.
final
expression Expression
May be overridden to support other types implementing Expression.
read-onlyinherited
hashCode int
The hash code for this object.
read-onlyinherited
isConst bool
Whether this expression implies a const context for sub expressions.
read-onlyinherited
nullChecked Expression
Applies the null check operator on this expression, returning this !.
read-onlyinherited
nullSafeSpread Expression
This expression precenede by the null safe spread operator ?....
read-onlyinherited
returned Expression
This expression preceded by return.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
spread Expression
This expression preceded by the spread operator ....
read-onlyinherited
statement Code
The expression as a valid Code block with a trailing ;.
read-onlyinherited
thrown Expression
This expression preceded by throw.
read-onlyinherited

Methods

accept<R>(covariant ExpressionVisitor<R> visitor, [R? context]) → R
override
and(Expression other) Expression
Returns the result of this && other.
inherited
asA(Expression other) Expression
Returns the result of this as other.
inherited
assign(Expression other) Expression
Return {this} = {other}.
inherited
assignConst(String name, [Reference? type]) Expression
Return const {name} = {this}.
inherited
assignFinal(String name, [Reference? type]) Expression
Return final {name} = {this}.
inherited
assignNullAware(Expression other) Expression
Return {this} ??= {other}.
inherited
assignVar(String name, [Reference? type]) Expression
Return var {name} = {this}.
inherited
call(Iterable<Expression> positionalArguments, [Map<String, Expression> namedArguments = const {}, List<Reference> typeArguments = const []]) Expression
Call this expression as a method.
inherited
cascade(String name) Expression
Returns an expression accessing ..<name> on this expression.
inherited
conditional(Expression whenTrue, Expression whenFalse) Expression
inherited
equalTo(Expression other) Expression
Returns the result of this == other.
inherited
greaterOrEqualTo(Expression other) Expression
Returns the result of this >= other.
inherited
greaterThan(Expression other) Expression
Returns the result of this > other.
inherited
ifNullThen(Expression other) Expression
Return {this} ?? {other}.
inherited
index(Expression index) Expression
Returns accessing the index operator ([]) on this.
inherited
isA(Expression other) Expression
Returns the result of this is other.
inherited
isNotA(Expression other) Expression
Returns the result of this is! other.
inherited
lessOrEqualTo(Expression other) Expression
Returns the result of this <= other.
inherited
lessThan(Expression other) Expression
Returns the result of this < other.
inherited
negate() Expression
Returns the result of !this.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
notEqualTo(Expression other) Expression
Returns the result of this != other.
inherited
nullSafeProperty(String name) Expression
Returns an expression accessing ?.<name> on this expression.
inherited
operatorAdd(Expression other) Expression
Returns the result of this + other.
inherited
operatorDivide(Expression other) Expression
Returns the result of this / other.
inherited
operatorEuclideanModulo(Expression other) Expression
Returns the result of this % other.
inherited
operatorMultiply(Expression other) Expression
Returns the result of this * other.
inherited
operatorSubstract(Expression other) Expression
Returns the result of this - other.
inherited
or(Expression other) Expression
Returns the result of this || other.
inherited
property(String name) Expression
Returns an expression accessing .<name> on this expression.
inherited
toString() String
A string representation of this object.
inherited

Operators

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