What is it?
What it is
morphnext is a Flutter package that converts bundled IconData glyphs into interruptible, spring‑driven vector morphs, enabling smooth icon transitions without pre‑made animation assets.
Why it exists
It addresses the need for dynamic, responsive icon animations in Flutter apps, eliminating the overhead of creating and managing separate animation assets for each icon pair while maintaining performance and consistency across themes and locales.
Who should use it
Developers building Flutter applications who want advanced animated vector morphs between IconData glyphs with spring-driven physics
Who should avoid it
Beginners new to Flutter, projects requiring simple static icons, and users needing non-icon-based morphs or full Path/SVG morphing capabilities
Stars over time
No change stars in the last 1 day
How it works
A quick walkthrough in plain English
How morphnext works
Step 1 of 3
You interact with it
Open morphnext, send a request, or connect it to your stack.
Features
Advantages
- Eliminates need for manual animation assets, reducing development effort
- Smooth, physics-driven transitions with spring dynamics
- Seamless integration with Flutter's existing icon system and themes
- Efficient memory management through lazy loading and caching
- MIT license enables open-source adoption and modification
- Maintains UI usability even with font loading issues or missing assets
Disadvantages
- Limited to IconData-based icons, cannot morph arbitrary Path or SVG content
- Monochrome rendering only (no color interpolation during morphs)
- Font loading failures may cause fallback to standard Flutter icons
- Cache configuration may require tuning for large applications
- Intermediate morph shapes may produce unexpected visual results for complex icon pairs
Installation
native
flutter pub add morphnext
FAQ
What is morphnext and what problem does it solve?
morphnext turns bundled Flutter IconData glyphs into interruptible, spring-driven vector morphs without requiring per-pair animation assets. It provides smooth, physically-responsive icon transitions using spring physics, eliminating the need to pre-build individual animation sequences for each icon pair.
How do I install morphnext?
Run `flutter pub add morphnext`. The package requires Dart >=3.9.0 and Flutter >=3.32.0. After installation, you can import it with `import 'package:morphnext/morphnext.dart';`.
What is an implicit morph and how does it differ from controlled morphs?
An implicit morph starts from the shape currently displayed on screen even when a new target interrupts an active transition. This makes it ideal for responsive UIs where the icon should adapt to incoming state changes rather than waiting for a complete animation cycle. Controlled morphs require explicit progression (e.g., via an Animation<double>) and are more predictable but less adaptive.
How can I create a progress-based morph transition?
Use the `MorphIcon` widget which accepts a `progress` parameter bound to any `Animation<double>` (such as a controller). The progress value is clamped to 0–1 and the transition follows spring physics defined by the `MorphSprings` enum (snappy by default, smooth for critically damped, or custom SpringDescription).
How does the morph cache work and what are the configuration options?
The application-wide morph cache stores completed morphs to avoid rebuilding vector buffers on every frame. It has two main configuration options: `maxMorphs` (number of morphs to retain) and `maxBytes` (memory limit in bytes). These can be set before `runApp` using `MorphCache.configure(maxMorphs: 100, maxBytes: 16 * 1024 * 1024);`. Cached morphs improve performance by reusing vector data across different icon pairs and directions.
Featured in Videos
YouTube tutorials and walkthroughs for morphnext
Alternatives
Similar projects ranked by category, topics, and text overlap.