Obtain getters and/or attribuites from ClassMirror #17361
Labels
area-library
closed-not-planned
Closed as we don't intend to take action on the reported issue
library-mirrors
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
This issue was originally filed by luisvargastij...@gmail.com
Previous version of dart were able to get getters using
cm.getters.values
However actual version was removed that featuread and replaced by
cm.declarations
last code gets all attributes, getters, setters, methods and constructor. I would like to know if there is a way to get only "getters and attributes" without others method.
The code that I'm using right now is that one:
As you can see in previous code to check if not the constructor I need to compare the delcaration.simpelName with cm.simpleName. Which until I understand this is ineficient since we are comparing strings.
In conclusion, I would like to know if there is or will be a better way to solve this problem.
The text was updated successfully, but these errors were encountered: