title: How to get the subtypes of a generic type using `DartType` from `analyzer` package?
body: <p>How can I get the subtypes of an element using the class <a href="https://www.dartdocs.org/documentation/analyzer/0.29.3/analyzer.dart.element.type/DartType-class.html" rel="noreferrer">DartType</a> from the <code>analyzer</code> package?</p>
  
  <p>for example if the type is <code>List&lt;String&gt;</code>, I would like to get <code>String</code>. Also will be useful to get if the type is <code>generic</code>.</p>
  
  <p>Another more complex example would be <code>Map&lt;String, String&gt;</code> where I want to get a list of the subtypes, in this case: <code>[String, String]</code>.</p>