FunctionRuntimeType class

Runtime model of a function type such as int Function(String, [double]) or void Function({int count}). Subtyping is structural: return type covariant, parameters contravariant, arities and named-parameter shape must line up.

Implemented types

Constructors

FunctionRuntimeType({required RuntimeType returnType, List<RuntimeType> positionalParameterTypes = const [], List<RuntimeType> optionalPositionalParameterTypes = const [], Map<String, RuntimeType> namedParameterTypes = const {}})
const
FunctionRuntimeType.untyped()
A function type with no declared shape — used as the default for callables whose parameter/return annotations could not be resolved. It matches any other function type.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
The name of the type.
no setteroverride
namedParameterTypes Map<String, RuntimeType>
final
optionalPositionalParameterTypes List<RuntimeType>
final
positionalParameterTypes List<RuntimeType>
final
returnType RuntimeType
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isSubtypeOf(RuntimeType other, {Object? value}) bool
Checks if this type is a subtype of other.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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