dart - Flutter - Custom Font not displaying

ID : 131339

viewed : 8

Tags : flutterdartfontsflutter-fontflutter

Top 5 Answer for dart - Flutter - Custom Font not displaying

vote vote

97

You might want to try removing the app from the device and reinstalling it. Depending on how you're launching, it might not be writing over the old install file.

vote vote

86

I had the same issue. If you're testing via an emulator, you just need to stop and restart it. Via VSCode you can just stop the run process (Red square in the top right) and then run -> Run without debugging or Start Debugging

vote vote

70

Whenever you make changes to pubspec.yaml file, it is always a good idea to stop the ongoing dart process from your IDE and do a full restart.

If you do hot reload or hot restart, engine may not be able to fetch the newly added data to your file. If nothing works, you should use @Collin answer, uninstall and reinstall the app.

vote vote

63

I had font: not right under flutter:. I moved the font: section right under flutter: , and worked.

flutter:    fonts:     - family: Test       fonts:       - asset: assets/fonts/Font-Test.ttf 
vote vote

59

Font declaration alignment is not as per flutter pubspec.yaml. It should be like below.

fonts:       - family: Coiny         fonts:           - asset: fonts/Coiny-Regular.ttf 

You can check out it here.

Top 3 video Explaining dart - Flutter - Custom Font not displaying

Related QUESTION?