Hello!
I'm looking for the equivalent of TypeProvider, but for third-party objects.
For example, while writing lints for one of my packages, I want to use the various DartType APIs (such as InterfaceType.instantiate or those from TypeSystem).
The thing is, even though a library may be using my package, it may not have its content imported.
This can happen when user code is split into multiple libraries. For example, a widget could be using flutter/material.dart. Then 'main' uses this widget, without importing flutter/material.dart
I could theorically resursively look through all imports/exports. But that feels very inneficient.
So to reiterate: Is it possible to obtain a DartType for an arbitrary object?
Ideally we'd have some form of get(uri, name)
Thanks!