MorphController class
Drives one morphing icon.
Create it with the icon it should paint first; it renders that icon immediately, without animating. Every method is a no-op after dispose.
- Inheritance
-
- Object
- ChangeNotifier
- MorphController
Constructors
- MorphController({required TickerProvider vsync, required MorphIconData icon})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isAnimating → bool
-
True while a spring is running.
no setter
- path → Path
-
The shape to paint right now. Reused across frames — treat as read-only.
no setter
- progress ↔ double
-
Progress of the last painted frame; 1 at rest.
getter/setter pair
- reducedMotion ↔ bool
-
When true, morphTo degrades to set — zero frames.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- target → MorphIconData
-
The icon currently targeted.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object.
override
-
morphTo(
MorphIconData icon, {SpringPreset? preset, double? stiffness, double? damping, Duration? duration}) → void -
Springs to
icon. Interruptible: called mid-flight it re-plans from the shape currently on screen and carries the spring's velocity across. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
seek(
MorphIconData icon, double t) → void -
Freezes the morph toward
iconatt, without any spring. -
set(
MorphIconData icon) → void -
Paints
iconimmediately. Zero frames. -
toPathD(
) → String -
The current shape as an SVG
dattribute. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited