MorphTransitionPlugin class
Morphs a container's shape, color, and border radius.
Params:
fromRadius(double) — Starting border radius. Default: 8.0toRadius(double) — Ending border radius. Default: 32.0fromColor(Color) — Starting fill color. Default: Color(0xFF1976D2)toColor(Color) — Ending fill color. Default: Color(0xFF42A5F5)
Usage:
MotionWidget(
transition: MorphTransitionPlugin(),
params: {
'fromRadius': 4.0, 'toRadius': 50.0,
'fromColor': Colors.blue, 'toColor': Colors.purple,
},
child: myWidget,
)
- Inheritance
-
- Object
- TransitionPlugin
- MorphTransitionPlugin
Constructors
- MorphTransitionPlugin()
-
const
Properties
-
affectedProperties
→ List<
AnimatableProperty> -
All widget properties this transition modifies.
Used by FrameBudgeter to decide whether to skip expensive effects.
no setteroverride
- description → String
-
Human-readable description of this transition (optional, for tooling).
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier used to look up this plugin in TransitionRegistry.
no setteroverride
- isExpensive → bool
-
True when this effect uses expensive GPU operations (blur, shader, clip).
The FrameBudgeter will disable expensive plugins under FPS threshold.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
{required Animation< double> animation, required Widget child, Map<String, Object?> params = const {}}) → Widget -
Builds the animated widget for the forward direction.
override
-
buildCurved(
{required Animation< double> animation, required Curve curve, required Widget child, Map<String, Object?> params = const {}}) → Widget -
Helper — wraps build with a CurvedAnimation.
inherited
-
buildReverse(
{required Animation< double> animation, required Widget child, Map<String, Object?> params = const {}}) → Widget -
Builds the animated widget for the reverse direction.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited