reflectType function

TypeMirror reflectType(
  1. Type key,
  2. [List<Type>? typeArguments]
)

Reflects the type represented by key.

If key is not an instance of Type, then this function throws an ArgumentError.

Optionally takes a list of typeArguments for generic classes. If the list is provided, then the key must be a generic class type, and the number of the provided type arguments must be equal to the number of type variables declared by the class.

Note that since one cannot obtain a Type object from another isolate, this function can only be used to obtain type mirrors on types of the current isolate.

Implementation

external TypeMirror reflectType(Type key, [List<Type>? typeArguments]);