Custom Icon Sets
The Iconify SDK allows you to easily integrate your own proprietary or custom-designed icons alongside the standard open-source collections.
Option 1: Using the CLI sync (Recommended)
Section titled “Option 1: Using the CLI sync (Recommended)”The easiest way to add custom icons is to provide them in the standard Iconify JSON format.
- Prepare your JSON: Create a JSON file (e.g.,
my_icons.json) following the Iconify JSON Specification. - Add to
iconify.yaml:custom_sets:- data/custom/my_icons.json - Generate: Run
dart run build_runner build.
The builder will automatically pick up your custom icons and generate type-safe constants for them.
Option 2: Manual Memory Injection
Section titled “Option 2: Manual Memory Injection”If you prefer to load icons dynamically at runtime, you can inject them directly into a MemoryIconifyProvider.
final customProvider = MemoryIconifyProvider();
customProvider.putIcon( const IconifyName('custom', 'logo'), const IconifyIconData( body: '<path d="..." fill="currentColor"/>', width: 24, height: 24, ),);
// Add to your IconifyAppIconifyApp( config: IconifyConfig( customProviders: [customProvider], ), child: MyApp(),)Creating Iconify JSON
Section titled “Creating Iconify JSON”You can use the Iconify Tools (Node.js) to convert a folder of SVG files into a standard Iconify JSON collection. This is the best way to manage large internal icon libraries.