#dart, #flutter, #package, #icons
Pixel Art Icons
Dart package to use
pixelarticons in Flutter
The original author is @halfmage on the pixelarticons.
So, please if you like these icons, thanks to @halfmage! and show support on the original repository!
Warning This package is just an automated tool to generate the font from the svg icons created by @halfmage.
How to use
1. Install the package
You can also check the on pub.dev.
flutter pub add pixelarticons
2. Import in to the project
Import wherever you want.
3. Use as
pixelarticons is the same of
Icons class but renamed to
- Lower-case for all icons and no separators, for example
card-plusis written as
- Icons that starts with non-alpha characters, like
4gare prefixed with
- Icons that are Dart keywords, like
switchare prefix with
/// 4k icon: Icon(Pixel.k4k) /// switch icon: Icon(Pixel.kswitch) /// align-left icon: Icon(Pixel.alignleft);
Purpose of this library
You can download directly from the source, but you'll need convert all the svg files to font and generate the Dart classes... and you'll repeat the process if you want to include a new released icon in the future, so this library was made to automate this gap.
As you can see, I'm not native English speaker, so this library certainly has many gramatical errors, typo, and wrong words. So if you have a proficient English you can contribute by fixing all these documentation errors!
If you can improve the tool, please, feel free to open a issue to discuss, I'll appreciate it!
Also, if you miss any icon, please ping me on the repository issues or Discord
rintt#1712, I'll take care to verify and trigger the update, thanks!
This library works automatically:
/downloadcontains a python script that downloads svg from all icons of
/libcontains an entry point that exports the generated icon classes (generated by fontify).
This flow is powered by GitHub actions, and the triggers are:
- scheduled: once a month we'll check if new icons are available, if so we'll update the
pub.devlibrary otherwise we'll just ignore the possible update
- manually: if we go to
actionstab, we can trigger the
runover the action card (need repo write access).
If you have ideas to share, bugs to report or need support, you can either open an issue or join our Discord server.
How to generate the icons
Dart SDK version: 2.14.4 (stable) Python 3.9.9
pip install requests
1. Download icons using Python.
2. Generate classes with
fontify as global dependency:
dart pub global activate fontify
dart pub global run fontify
Done, you'll see a folder called
~/release and a font
What you want is the font inside the
~/fonts folder, the
~/release folder should be ignored. Now you can publish or do whatever you want!
Breaking Change Exception
This means that this tool can't find the latest release of the pixelarticons repository.
But this can have several causes, so the best way to fix that is to first figure out where the icons are located in the original repository and then update the
~/download/download.py script to fix/cover the breaking changes if they exists (this error can also be caused by a simple python exception).
Please fill a issue to see what is going wrong and do not worry: all current releases and versions will be available.
Copyright © 2022-present, Alex Rintt.
Pixel Art Icons Dart Wrapper is MIT licensed 💖