fluttercommunity / font_awesome_flutter

The Font Awesome Icon pack available as Flutter Icons
Other
857 stars 246 forks source link

[Feature] Pick icon from old version #236

Closed EArminjon closed 1 year ago

EArminjon commented 1 year ago

Is your feature request related to a problem? Please describe. It could be useful to have a package or a method which offer the possibility to specify the version of an icon. Icon can have a different look on some version. For example between 5 and 6 the shop icon look different. Clients sometimes didn't like FontAwesome icons of the version 6 and prefer the old one.

Version 5 Capture d’écran 2023-03-24 à 12 14 29

Version 6 Capture d’écran 2023-03-24 à 12 14 37

Describe the solution you'd like It could be great to expose something like FontAwesomeIcons6 and FontAwesomeIcons5 class. A clear and concise description of what you want to happen.

Describe alternatives you've considered Download manually the SVG file of the old icon. It increase complexity and refactoring. Sometime we use icon, sometime image...

Additional context None

michaelspiss commented 1 year ago

Hey @EArminjon! I have been thinking about this for a long time now. I can see the use case, but it's too niche to justify the amount of work required to make it a feature officially supported by this package.

Since it is open source, you are however welcome to just use any previous version of this package and rename it and the icons class to for example font_awesome_flutter_five and FontAwesomeFiveIcons. This way you can have both versions and icon tree shaking removes all unused icons automatically. Hope this helps whenever the need arises again in the future.