Impeller & Flutter Rendering
The Iconify SDK is built to be “Impeller Ready,” ensuring smooth performance on Flutter’s next-generation rendering engine.
The Impeller Challenge
Section titled “The Impeller Challenge”Impeller introduced significant changes to how SVG color filters are handled. In some scenarios, applying a color override to a complex SVG can result in rendering artifacts or performance drops on certain devices.
How the SDK Solves It
Section titled “How the SDK Solves It”The SDK implements an Automated Hybrid Rendering Path to ensure perfect visuals regardless of your renderer:
-
Direct SVG: By default, the SDK uses
flutter_svgto render the icon directly. This is the fastest and most memory-efficient path. -
Rasterized Fallback: If the SDK detects that:
- Impeller is the active renderer.
- A
coloroverride is requested. - The icon is complex (or a specific flag is set).
…it will automatically switch to a rasterized path. The SVG is rendered to a high-resolution
ui.Imagein a separate isolate and then displayed. This bypasses the Impeller color-filter issue entirely.
Platform Support Matrix
Section titled “Platform Support Matrix”| Platform | Default Renderer | Iconify Path |
|---|---|---|
| iOS | Impeller (>= 3.10) | Hybrid (Auto-switch) |
| Android | Skia (Impeller Opt-in) | Skia (Direct) / Impeller (Hybrid) |
| Web | CanvasKit / HTML | Direct SVG |
| Desktop | Skia | Direct SVG |
Manual Override
Section titled “Manual Override”You can manually control the rendering strategy for a specific icon if needed:
IconifyIcon( 'mdi:rocket', renderStrategy: RenderStrategy.rasterized, // Force rasterization)For most users, leaving the default RenderStrategy.auto is recommended.