dimanche 12 septembre 2021

How to get a specific Set

I want to use dart:analyzer for code generation and i want to construct a specific Set Type from a given DartType. So something like this:

final DartType t = getMyType(); // previously extracted type
final DartType result = Set<t>; // this does not work, just trying to illustrate what i want

Can i in any way create an instance of DartType for Set<t> or can i somehow get the LibraryElement to dart:core to get to the ClassElement of Set and then somehow place in my template parameter to get to the ClassElement of Set<t>?





Aucun commentaire:

Enregistrer un commentaire