Skip to content

Migrating from iconify_flutter

This guide helps you migrate your project from the legacy (and now archived) iconify_flutter package to the modern iconify_sdk.

Featureiconify_fluttericonify_sdk
RenderingDirect SVGHybrid (SVG + Raster fallback for Impeller)
OfflineManual download of large classesAutomatic bundling of only used icons
PerformanceBasicOptimized with LRU caching & pure Dart core
CLINoneFull suite for syncing and auditing

Remove the old package and add the new one:

pubspec.yaml
dependencies:
# iconify_flutter: ^0.1.0 <-- Remove
iconify_sdk: ^0.2.0

Wrap your root widget in IconifyApp. This replaces the need for any manual initialization.

main.dart
void main() {
runApp(const IconifyApp(child: MyApp()));
}

Rename Iconify(...) widgets to IconifyIcon(...). The parameters are mostly compatible.

// OLD
Iconify(Mdi.home, color: Colors.blue)
// NEW (Dynamic string)
IconifyIcon('mdi:home', color: Colors.blue)
// NEW (Type-safe bundled)
IconifyIcon.name(IconsMdi.home, color: Colors.blue)

Instead of manually maintaining massive icon data classes, use the new bundling workflow:

  1. Run dart run iconify_sdk_cli:iconify init
  2. Run dart run iconify_sdk_cli:iconify sync
  3. Add iconify_sdk_builder to dev_dependencies
  4. Run dart run build_runner build

This will generate a tiny, optimized lib/icons.g.dart file containing only the icons your app actually uses.