typeArgumentsOf method

List<DartType>? typeArgumentsOf(
  1. TypeChecker checker
)

If this is the Type or implements the Type represented by checker, returns the generic arguments to the checker Type if there are any.

If the checker Type doesn't have generic arguments, null is returned.

Implementation

List<DartType>? typeArgumentsOf(TypeChecker checker) {
  final implementation = _getImplementationType(checker) as InterfaceType?;

  return implementation?.typeArguments;
}