fontAwesome icons do not work inside my flutter app
If your app is running on the emulator or device just stop it and relaunch it again it solves your problem
The author of font_awesome_flutter
package suggests the following steps for anyone who has icons not showing problem:
- Stopping the app
- Running flutter clean in your app directory
- Deleting the app from your simulator / emulator / device
- Rebuild & Deploy the app.
Also make sure to set uses-material-design
to true
in pubspec.yaml file.
This happens when you start using the older version of font_awesome_flutter and because the virtual device cache is stored when you build the Flutter app, so every time you change the icon you have to stop the emulator and rebuild it.
My experience is:
Stop
main.dart
(Android Emulator)In
pubspec.yaml
add (font_awesome_flutter) new version
font_awesome_flutter: ^8.8.1
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
font_awesome_flutter: ^8.8.1 //new verison
And Then click
"Pub get"
at the top of Flutter commands
- Run the emulator again (start main.dart)