Open MostHated opened 4 years ago
I don't recommend getting the icon this way. I recommend using the static property of the class, such asAntDesign.stepforward
,
1. You can get friendly hints from editors, such as Android studio
2. If you can get the static property, the icon must exist
3. You can get icons of type const
If you use a string to get the icon, you won't get any of these advantages
@2534290808 Agreed on the advantages.
But, what about the case where one is getting an icon from the backend. Backend is ensuring to send the icons which actually exist. In that case, it will be beneficial to map the icons with string.
Something like FlutterIcon.getIconData('<name-of-icon>')
Hey there, I had been using another library before that had some nice helper functions, as seen below:
It would let me retrieve an icon based on a string, which was perfect as all of my data is built from retrieving json data from my site. I have been looking for a larger variety of icons, so this package looked great, but I am having issue trying to get them as I have been prior.
I tried to see if I could use something like this:
Is there anything available that I just didn't see, or that can be added to this package similar to this? Thanks, -MH