ConstObject class abstract

Represents a constant object value.

This abstract class provides a common interface for accessing properties of constant objects, such as those created with const MyClass(...).

Inheritance
Implementers

Constructors

ConstObject()
Creates a new constant object.

Properties

constructorArguments → List<Expression>
The constructor arguments used to create the constant.
no setter
constructorName → String?
The name of the constructor used to create the constant.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isBool → bool
Whether this constant represents a boolean value.
no setterinherited
isDouble → bool
Whether this constant represents a double value.
no setterinherited
isEnumValue → bool
Whether this constant represents an enum value.
no setterinherited
isFunctionReference → bool
Whether this constant represents a function reference.
no setterinherited
isInt → bool
Whether this constant represents an integer value.
no setterinherited
isInvalid → bool
Whether this constant represents an invalid constant.
no setterinherited
isList → bool
Whether this constant represents a list.
no setterinherited
isLiteral → bool
Whether this constant is a literal value.
no setterinherited
isMap → bool
Whether this constant represents a map.
no setterinherited
isNull → bool
Whether this constant represents null.
no setterinherited
isNum → bool
Whether this constant represents a numeric value.
no setterinherited
isObject → bool
Whether this constant represents an object.
no setterinherited
isSet → bool
Whether this constant represents a set.
no setterinherited
isString → bool
Whether this constant represents a string value.
no setterinherited
isSymbol → bool
Whether this constant represents a symbol.
no setterinherited
isType → bool
Whether this constant represents a type reference.
no setterinherited
literalValue → Object?
The literal Dart value represented by this constant.
no setterinherited
props → Map<String, Constant?>
The properties of the constant object.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → DartType
The type of the constant object.
no setter

Methods

get(String key) → Constant?
Gets a property value by name.
getBool(String key) → ConstBool?
Gets a boolean property by name.
getDouble(String key) → ConstDouble?
Gets a double property by name.
getEnumValue(String key) → ConstEnumValue?
Gets an enum value property by name.
getFunctionReference(String key) → ConstFunctionReference?
Gets a function reference property by name.
getInt(String key) → ConstInt?
Gets an integer property by name.
getList(String key) → ConstList?
Gets a list property by name.
getMap(String key) → ConstMap?
Gets a map property by name.
getNum(String key) → ConstNum?
Gets a numeric property by name.
getObject(String key) → ConstObject?
Gets an object property by name.
getSet(String key) → ConstSet?
Gets a set property by name.
getString(String key) → ConstString?
Gets a string property by name.
getTypeRef(String key) → ConstType?
Gets a type reference property by name.
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