reflectType function
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]);
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-mirrors/reflectType.html