How to get the subtypes of a generic type using `DartType` from `analyzer` package?
问题 How can I get the subtypes of an element using the class DartType from the analyzer package? for example if the type is List<String> , I would like to get String . Also will be useful to get if the type is generic . Another more complex example would be Map<String, String> where I want to get a list of the subtypes, in this case: [String, String] . 回答1: This one is a little tricky - because DartType actually itself has some super types - the one that will interest you here is