InterfaceType class abstract
Represents a class, mixin, or interface type in Dart.
Provides access to the type's members, interfaces, and inheritance hierarchy.
- Inheritance
-
- Object
- DartType
- ParameterizedType
- NamedDartType
- InterfaceType
- Implementers
Constructors
Properties
-
allSupertypes
→ List<
NamedDartType> -
All direct and indirect supertypes of this interface type.
no setter
- declarationRef → DeclarationRef
-
Reference to the declaration of this type.
no setterinherited
- element → InterfaceElement
-
The element that declares this interface type.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
then identifier that points to declaration of this type
no setterinherited
-
interfaces
→ List<
NamedDartType> -
The list of interfaces implemented by this type.
no setter
- isClass → bool
-
Whether this type refers to a ClassElement.
no setterinherited
- isDartAsyncFuture → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:async library. Returntrue
if this type represents the type '{TYPE}' defined in the dart:async library.no setterinherited - isDartAsyncFutureOr → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:async library.no setterinherited - isDartAsyncStream → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:async library.no setterinherited - isDartCoreBigInt → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreBool → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library. Returntrue
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreDateTime → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreDouble → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreEnum → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreFunction → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreInt → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreIterable → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreList → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreMap → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreNull → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreNum → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreObject → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreRecord → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreSet → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreString → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreSymbol → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDartCoreType → bool
-
Return
true
if this type represents the type '{TYPE}' defined in the dart:core library.no setterinherited - isDynamic → bool
-
Return
true
if this type represents the type 'dynamic'no setterinherited - isEnum → bool
-
Whether this type refers to an EnumElement.
no setterinherited
- isInvalid → bool
-
Return
true
if this type represents the type 'Invalid'no setterinherited - isMixin → bool
-
Whether this type refers to a MixinElement.
no setterinherited
- isNever → bool
-
Return
true
if this type represents the type 'Never'no setterinherited - isNullable → bool
-
Whether this type is nullable.
no setterinherited
- isValid → bool
-
Returns whether this type is valid (not an invalidType).
no setterinherited
- isVoid → bool
-
Return
true
if this type represents the type 'void'no setterinherited -
mixins
→ List<
NamedDartType> -
The list of mixins applied to this type.
no setter
- name → String
-
The name of this type.
no setterinherited
- resolver → Resolver
-
The resolver used to resolve this type.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- superType → NamedDartType?
-
The super type of this interface type, or null if it's Object.
no setter
-
typeArguments
→ List<
DartType> -
The type arguments applied to this type.
no setterinherited
Methods
-
getConstructor(
String name) → ConstructorElement? -
Returns the constructor with the given
name
, or null if not found. -
getField(
String name) → FieldElement? -
Returns the field with the given
name
, or null if not found. -
getMethod(
String name) → MethodElement? -
Returns the method with the given
name
, or null if not found. -
hasConstructor(
String name) → bool -
Returns true if this type has a constructor with the given
name
. -
hasField(
String name) → bool -
Returns true if this type has a field with the given
name
. -
hasMethod(
String name) → bool -
Returns true if this type has a method with the given
name
. -
hasPropertyAccessor(
String name) → bool -
Returns true if this type has a property accessor with the given
name
. -
isExactly(
DartType other) → bool -
Determines if this type is exactly the same as
other
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withNullability(
bool isNullable) → DartType -
Returns a copy of this type with the specified nullability.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited