DartType class abstract

The type associated with elements in the element model.

Clients may not extend, implement or mix-in this class.

Implementers

Constructors

DartType()

Properties

alias InstantiatedTypeAliasElement?
If this type is an instantiation of a type alias, information about the alias element, and the type arguments. Otherwise return null.
no setter
element Element?
Return the element representing the declaration of this type, or null if the type is not associated with an element.
no setter
element3 Element2?
Return the element representing the declaration of this type, or null if the type is not associated with an element.
no setter
extensionTypeErasure DartType
The extension type erasure of this type.
no setter
hashCode int
The hash code for this object.
no setterinherited
isBottom bool
Return true if this type represents the bottom type.
no setter
isDartAsyncFuture bool
Return true if this type represents the type 'Future' defined in the dart:async library.
no setter
isDartAsyncFutureOr bool
Return true if this type represents the type FutureOr<T> defined in the dart:async library.
no setter
isDartAsyncStream bool
Return true if this type represents the type 'Stream' defined in the dart:async library.
no setter
isDartCoreBool bool
Return true if this type represents the type 'bool' defined in the dart:core library.
no setter
isDartCoreDouble bool
Return true if this type represents the type 'double' defined in the dart:core library.
no setter
isDartCoreEnum bool
Return true if this type represents the type 'Enum' defined in the dart:core library.
no setter
isDartCoreFunction bool
Return true if this type represents the type 'Function' defined in the dart:core library.
no setter
isDartCoreInt bool
Return true if this type represents the type 'int' defined in the dart:core library.
no setter
isDartCoreIterable bool
Returns true if this type represents the type 'Iterable' defined in the dart:core library.
no setter
isDartCoreList bool
Returns true if this type represents the type 'List' defined in the dart:core library.
no setter
isDartCoreMap bool
Returns true if this type represents the type 'Map' defined in the dart:core library.
no setter
isDartCoreNull bool
Return true if this type represents the type 'Null' defined in the dart:core library.
no setter
isDartCoreNum bool
Return true if this type represents the type 'num' defined in the dart:core library.
no setter
isDartCoreObject bool
Return true if this type represents the type Object defined in the dart:core library.
no setter
isDartCoreRecord bool
Return true if this type represents the type 'Record' defined in the dart:core library.
no setter
isDartCoreSet bool
Returns true if this type represents the type 'Set' defined in the dart:core library.
no setter
isDartCoreString bool
Return true if this type represents the type 'String' defined in the dart:core library.
no setter
isDartCoreSymbol bool
Returns true if this type represents the type 'Symbol' defined in the dart:core library.
no setter
isDartCoreType bool
Return true if this type represents the type 'Type' defined in the dart:core library.
no setter
name String?
Return the name of this type, or null if the type does not have a name, such as when the type represents the type of an unnamed function.
no setter
nullabilitySuffix NullabilitySuffix
If this type ends in a suffix (? or *), the suffix it ends with; otherwise NullabilitySuffix.none.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

accept<R>(TypeVisitor<R> visitor) → R
Use the given visitor to visit this type.
acceptWithArgument<R, A>(TypeVisitorWithArgument<R, A> visitor, A argument) → R
Use the given visitor to visit this type.
asInstanceOf(InterfaceElement element) InterfaceType?
Return the canonical interface that this type implements for element, or null if such an interface does not exist.
asInstanceOf2(InterfaceElement2 element) InterfaceType?
Return the canonical interface that this type implements for element, or null if such an interface does not exist.
getDisplayString({bool withNullability = true}) String
Return the presentation of this type as it should appear when presented to users in contexts such as error messages.
isStructurallyEqualTo(SharedTypeStructure<DartType> other) bool
inherited
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