Menu

Post image 1
Post image 2
1 / 2
0

Stop hand-writing IconData — introducing `icon_font_extractor`

DEV Community·Julian Finkler·18 days ago
#YDjpe9v6
Reading 0:00
15s threshold

If you've ever dropped a custom icon font into a Flutter app and then spent the next hour copying codepoints from a website into static const declarations, this one's for you. ( https://pub.dev/packages/iconfontextractor ) The real pain: Font Awesome Pro My specific trigger for building this package was Font Awesome Pro. FA Pro is excellent — thousands of high-quality icons, multiple styles (solid, regular, light, thin, duotone), and a proper ligature-based font file. But integrating it into Flutter the "normal" way is a nightmare: Find the codepoint for each icon you need Write static const IconData faHouse = IconData(0xf015, fontFamily: 'FontAwesomePro') by hand Repeat for every single icon across every style variant Maintain it when you update the font There are third-party packages that ship pre-built constant maps, but those only cover the free tier, go stale between FA versions, and add a dependency you have to trust.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More