Browse the pack at icofont.com/icons. An icon's
name there maps to a constant by camel casing it:
IcoFont name
Constant
angry-monster
IcoFontIcons.angryMonster
brand-icofont
IcoFontIcons.brandIcofont
ui-calculator
IcoFontIcons.uiCalculator
500px
IcoFontIcons.fiveHundredpx
Names that would start with a digit are spelled out, since Dart identifiers
cannot. lib/icofont_flutter.dart lists every constant with its IcoFont name in
a comment above it.
The 324 duotone icons are not currently available — they are drawn as pairs of
stacked glyphs, which the single-IconData API here cannot express.
Requirements
Dart >=2.12.0 <4.0.0, Flutter >=1.17.0. Works on Dart 2 and Dart 3.
Example
See example/ for a small app that renders icons from the pack:
cd example
flutter run
Updating the icons
lib/icofont_flutter.dart is generated from lib/fonts/icofont.ttf — do not
edit it by hand. After replacing the font, regenerate:
dart run tool/generate_icons.dart
The generator reads glyph names from the font's post table and code points
from its cmap table. It refuses to guess a name it cannot derive, so if it
reports a problem, add the icon to nameOverrides in the script rather than
editing the output. CI runs dart run tool/generate_icons.dart --check to
verify the committed file still matches the font.
Credits
Icons by the IcoFont team, who made this wonderful pack
free for everyone. This package only wraps their work for Flutter.