findComponentType<C> abstract method
Finds the component type of a collection-like class.
Type Parameters:
C: The expected component type.
Parameters:
parentClass: The class representing the collection.component: The runtime Type to help narrow the match (optional).
Returns:
- A Class<C> representing the component type, or
nullif none exists.
Example
final listClass = await loader.loadClass<List<String>>('dart:core/list.dart.List');
final stringType = loader.findComponentType<String>(listClass);
print(stringType?.qualifiedName); // "dart:core/string.dart.String"
Implementation
Class<C>? findComponentType<C>(Class parentClass, Type? component);