TypeProvider class Null safety

The interface TypeProvider defines the behavior of objects that provide access to types defined by the language.

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

Constructors

TypeProvider()

Properties

boolElement ClassElement
Return the element representing the built-in class bool.
read-only
boolType InterfaceType
Return the type representing the built-in type bool.
read-only
bottomType DartType
Return the type representing the type bottom.
read-only
deprecatedType InterfaceType
Return the type representing the built-in type Deprecated.
read-only
doubleElement ClassElement
Return the element representing the built-in class double.
read-only
doubleType InterfaceType
Return the type representing the built-in type double.
read-only
dynamicType DartType
Return the type representing the built-in type dynamic.
read-only
functionType InterfaceType
Return the type representing the built-in type Function.
read-only
futureDynamicType InterfaceType
Return the type representing Future<dynamic>.
read-only
futureElement ClassElement
Return the element representing the built-in class Future.
read-only
futureNullType InterfaceType
Return the type representing Future<Null>.
read-only
futureOrElement ClassElement
Return the element representing the built-in class FutureOr.
read-only
futureOrNullType InterfaceType
Return the type representing FutureOr<Null>.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
intElement ClassElement
Return the element representing the built-in class int.
read-only
intType InterfaceType
Return the type representing the built-in type int.
read-only
iterableDynamicType InterfaceType
Return the type representing the type Iterable<dynamic>.
read-only
iterableElement ClassElement
Return the element representing the built-in class Iterable.
read-only
iterableObjectType InterfaceType
Return the type representing the type Iterable<Object>.
read-only
listElement ClassElement
Return the element representing the built-in class List.
read-only
mapElement ClassElement
Return the element representing the built-in class Map.
read-only
mapObjectObjectType InterfaceType
Return the type representing Map<Object, Object>.
read-only
neverType DartType
Return the type representing the built-in type Never.
read-only
nonSubtypableClasses Set<ClassElement>
Return a list containing all of the types that cannot be either extended or implemented.
@Deprecated('Use isNonSubtypableClass instead'), read-only
nullElement ClassElement
Return the element representing the built-in class Null.
read-only
nullType InterfaceType
Return the type representing the built-in type Null.
read-only
numElement ClassElement
Return the element representing the built-in class num.
read-only
numType InterfaceType
Return the type representing the built-in type num.
read-only
objectType InterfaceType
Return the type representing the built-in type Object.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
setElement ClassElement
Return the element representing the built-in class Set.
read-only
stackTraceType InterfaceType
Return the type representing the built-in type StackTrace.
read-only
streamDynamicType InterfaceType
Return the type representing Stream<dynamic>.
read-only
streamElement ClassElement
Return the element representing the built-in class Stream.
read-only
stringElement ClassElement
Return the element representing the built-in class String.
read-only
stringType InterfaceType
Return the type representing the built-in type String.
read-only
symbolElement ClassElement
Return the element representing the built-in class Symbol.
read-only
symbolType InterfaceType
Return the type representing the built-in type Symbol.
read-only
typeType InterfaceType
Return the type representing the built-in type Type.
read-only
voidType VoidType
Return the type representing the built-in type void.
read-only

Methods

futureOrType(DartType valueType) InterfaceType
Return the instantiation of the built-in class FutureOr with the given valueType. The type has the nullability suffix of this provider.
futureOrType2(DartType valueType) InterfaceType
Return the instantiation of the built-in class FutureOr with the given valueType. The type has the nullability suffix of this provider.
@Deprecated('Use futureOrType instead')
futureType(DartType valueType) InterfaceType
Return the instantiation of the built-in class Future with the given valueType. The type has the nullability suffix of this provider.
futureType2(DartType valueType) InterfaceType
Return the instantiation of the built-in class Future with the given valueType. The type has the nullability suffix of this provider.
@Deprecated('Use futureType instead')
isNonSubtypableClass(ClassElement element) bool
Return true if element cannot be extended, implemented, or mixed in.
isObjectGetter(String id) bool
Return 'true' if id is the name of a getter on the Object type.
isObjectMember(String id) bool
Return 'true' if id is the name of a method or getter on the Object type.
isObjectMethod(String id) bool
Return 'true' if id is the name of a method on the Object type.
iterableType(DartType elementType) InterfaceType
Return the instantiation of the built-in class Iterable with the given elementType. The type has the nullability suffix of this provider.
iterableType2(DartType elementType) InterfaceType
Return the instantiation of the built-in class Iterable with the given elementType. The type has the nullability suffix of this provider.
@Deprecated('Use iterableType instead')
listType(DartType elementType) InterfaceType
Return the instantiation of the built-in class List with the given elementType. The type has the nullability suffix of this provider.
listType2(DartType elementType) InterfaceType
Return the instantiation of the built-in class List with the given elementType. The type has the nullability suffix of this provider.
@Deprecated('Use listType instead')
mapType(DartType keyType, DartType valueType) InterfaceType
Return the instantiation of the built-in class List with the given keyType and valueType. The type has the nullability suffix of this provider.
mapType2(DartType keyType, DartType valueType) InterfaceType
Return the instantiation of the built-in class List with the given keyType and valueType. The type has the nullability suffix of this provider.
@Deprecated('Use mapType instead')
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
setType(DartType elementType) InterfaceType
Return the instantiation of the built-in class Set with the given elementType. The type has the nullability suffix of this provider.
setType2(DartType elementType) InterfaceType
Return the instantiation of the built-in class Set with the given elementType. The type has the nullability suffix of this provider.
@Deprecated('Use setType instead')
streamType(DartType elementType) InterfaceType
Return the instantiation of the built-in class Stream with the given elementType. The type has the nullability suffix of this provider.
streamType2(DartType elementType) InterfaceType
Return the instantiation of the built-in class Stream with the given elementType. The type has the nullability suffix of this provider.
@Deprecated('Use streamType instead')
toString() String
A string representation of this object. [...]
inherited

Operators

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