Script for generating icons for Flutter apps from Adobe Illustrator. The script can also be used for other, more generic projects.
Copy the file ai/FlutterGenerateIcons.jsx
to
~/Applications/{Adobe Illustrator}/Presets/{locale}/Scripts/
for macOS, orC:\Program Files\Adobe\{Adobe Illustrator}\Presets\{locale}\Scripts\
for Windows.
- Setup the scripts for your desired program.
- Open your icon file.
- Open menu
File -> Scripts
. - Click on
FlutterGenerateIcons
. - From popup select the root of your Flutter project (directory containing
pubspec.yaml
file). - In the main window of script
- choose the Artboard you want exported,
- platforms for which you want to generate the icons, and
- leave Flutter checked under frameworks.
- Click on "Export" button and wait for the window to close.
- If everything went as expected, you should have appropriate icons in desired folders.
- Setup the scripts for your desired program.
- Open your icon file.
- Open menu
File -> Scripts
. - Click on
FlutterGenerateIcons
. - From popup select the folder depending on type of your project.
- iOS: Select the
Assets.xcassets
directory. - macOS: Select the
Assets.xcassets
directory. - Android: Select the root of your Android project.
- iOS: Select the
- In the main window of script
- choose the Artboard you want exported,
- platform for which you want to generate the icons, and
- uncheck the Flutter checkbox under frameworks.
- Click on "Export" button and wait for the window to close.
- If everything went as expected, you should have appropriate icons in desired folders.
By defualt, when creating an icon for Windows, only PNGs of different sizes are created. In order to
combine them into a .ico
file, use png2ico
. Usage is
completely straightforward and a project has great documentation.
The user interface is completely straightforward and plain, without any unnecessary garbage.
This project is licensed under MIT License.
If you have a suggestion for another framework, or software like Photoshop, feel free to file an issue, or even a pull request!
If you find this project useful, consider giving it a star. It would mean a lot to me!