I am using the reflectable library to reflect on types from imported packages (like analysis_server_client or flutter). I can reflect on types that have public constructors like Notification or Request (from the analysis_server_client package). I reflect on those types by extending those types and then using the superclassQuantifyCapability capability.
However, I am not able to reflect on types that have a private constructor like Icons (from the flutter package) since I cannot extend them. Is there a way to reflect on types like Icons that have a private constructor?
I figured it out. You have to use the
GlobalQuantifyCapabilitywhich lets you declare which members to generate reflection on. It works on classes with private constructors as well. Some sample code: