For anyone who is here for another FontAwesome icons issue – some icons does not work on Flutter when entered exact name. Naming convention is different for long 2-3 words named icons on Flutter package of FontAwesome. For example, solar-panel icon should be entered as solarPanel on Flutter. It is same for all long 2-3 words named icons.
From package specification on pub.dev:
Icon names # Icon names equal those on the official website, but are
written in lower camel case. If more than one icon style is available
for an icon, the style name is used as prefix, except for "regular".
Due to restrictions in dart, icons starting with numbers have those
numbers written out.
3
Answers
Use This Code
EX:
Your code is correct.
Try following steps:
flutter pub get
in your terminalpubspec.yaml file
Widget:
Your result:
For anyone who is here for another FontAwesome icons issue – some icons does not work on Flutter when entered exact name. Naming convention is different for long 2-3 words named icons on Flutter package of FontAwesome. For example,
solar-panel
icon should be entered assolarPanel
on Flutter. It is same for all long 2-3 words named icons.From package specification on pub.dev: