-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get full display type name from DartType? #553
Comments
Can you provide more info, and ideally a reproduction case? It sounds like you said this used to work and no longer does. When did it stop working? Was there an SDK or analyzer update that changed the behavior? |
@jakemac53 This issue just happen recently on latest SDK (I upgraded flutter few times). I can't tell you which version that worked before because it was few months ago. The source_gen version was 1.0.2 (but the same issue on 1.0.5).
Then use this generator to read it:
The problem is that the sdk changed behavior of getDisplayString |
I'm not sure if this is something we want to try to support directly. Mockito has a utility to help get a @srawlins - do you think there is an opportunity to share any of this logic in |
I've lightly pondered this for a while, but my use case always comes down to a necessary dependency on code_builder since I definitely want So the utility necessarily depends on What are the downsides to a new package? Maintenance..., not much else. (Not to minimize "maintenance," this is huge during language version bump cycles, like Null Safety, or a major version bump to dependencies...) |
What do you think about creating a class in |
I have a property like:
Before I can read its type when running analyzer with this code:
But now the field type result is
Map<dynamic, Map<dynamic, dynamic>**>
The doc says that I shouldn't depend on
getDisplayString()
, but I can't find any way to do this.How can I get the full type
Map<MyEnum, Map<String, String>>
from my property?Flutter doctor:
The text was updated successfully, but these errors were encountered: