morphicons_flutter library
Morphicons for Flutter: MorphIcon widget, shared ticker scheduler and
CustomPainter paint driver on top of the vendored pure-Dart solver.
Classes
- MaterialIconPaths
- Also expose named constants for direct use in examples / tests.
- MorphCanvas
- An icon that animates to a new icon using the shared morph scheduler.
- MorphCanvasPainter
- A controlled painter for a morphing stroked icon.
- MorphCanvasState
- State and scheduler lifecycle for MorphCanvas.
- MorphIcon
- An icon that morphs to a new shape when icon changes.
- MorphIconState
-
State of MorphIcon; exposed for the imperative mode:
GlobalKey<MorphIconState>().currentState?.morphTo(...)/.set(...). - MorphMask
- Clips a child with the alpha of a morphing stroked icon.
- MorphMaskState
- State and scheduler lifecycle for MorphMask.
- MorphPainter
- CustomPainter for rendering a morph plan at progress t.
- MorphPair
- Describes a morph from from to to without owning animation state.
- MorphPlan
- Frozen correspondence + alignment between two sampled icons.
- MorphScheduler
- Singleton scheduler that drives all morph animations with a single Ticker.
- MorphTween
-
A ticker-free, plan-backed
d-string interpolator. - Spring
- SpringPreset
- Spring presets (ζ = c/(2√k)) with the API's public names.
Extensions
- MorphStringExtensions on String
-
Readable helpers for icon
dstrings.
Functions
-
buildPlan(
List< Sampled> srcSubs, List<Sampled> dstSubs) → MorphPlan - Builds the morph plan between two lists of sampled subpaths. The plan is cacheable and serializable; it accepts any list — including intermediate shapes (interruptions).
-
canResolveIconData(
IconData data) → bool -
trueif the IconData can be resolved without error. -
iconDataToPath(
IconData data) → String? -
Resolves an IconData to its SVG
dif present in the curated table. -
iconDataToPathOrThrow(
IconData data) → String - Like iconDataToPath but throws with a actionable message.
-
planBetween(
IconInput src, IconInput dst) → MorphPlan - Rest→target plan, cached when both endpoints have stable identity. Plans from intermediate shapes (interruptions passed as strings) are never cached.
-
springSettled(
double x, double v) → bool - Settle condition: |1−x| < 0.001 ∧ |v| < 0.02.
Typedefs
- MorphSource = Object
-
Documentation-only union:
String(SVG d) |IconData|IconNode. - SpringTicker = void Function(double dt)
- A spring that can be stepped by the scheduler.