Sometimes, you may want to add custom icons to your Flutter application. In this tutorial, I will show you how to add custom icons to your Flutter application.
Pre-requisites
First of all, upload your icons(.svg)
to fluttericon.com and generate a font. Then download it.
Now, Create the fonts/
folder and add the downloaded font CustomIcons.ttf
, then modify the pubspec.yaml
file:
Finally, copy the custom_icons.dart
file to lib/config
How use Custom Icons?
To use the custom icons, you need to import the custom_icons.dart
file and use the icon name.
References