M3EMotion class

Spring animation configuration for Material 3 Expressive components.

Use to customize the spring physics for component animations.

Motion Presets

The class provides two families of presets:

  • Spatial motions: animate shapes (like border radius)
  • Effects motions: animate opacity/scale effects

Each family has three speed variants:

  • Fast: Snappy, responsive animations
  • Default: Balanced feel
  • Slow: More relaxed, dramatic animations

Custom Motion

Use M3EMotion.custom to create a custom spring with specific physics:

M3EMotion.custom(1600, 0.85)
Annotations

Constructors

M3EMotion.custom({required double stiffness, required double damping})
Creates a custom spring motion with the specified physics.
const

Properties

damping → double
Spring damping. Values closer to 1 make the spring less bouncy.
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
snapToEnd → bool
Whether the spring should snap to the end position.
final
stiffness → double
Spring stiffness. Higher values make the spring snappier.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMotion() → SpringMotion
Converts this M3EMotion to a SpringMotion for animation use.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Constants

expressiveEffectsDefault → const M3EMotion
Default expressive effects motion (stiffness: 1600, damping: 1).
expressiveEffectsFast → const M3EMotion
Fast expressive effects motion (stiffness: 3800, damping: 1).
expressiveEffectsSlow → const M3EMotion
Slow expressive effects motion (stiffness: 800, damping: 1).
expressiveSpatialDefault → const M3EMotion
Default expressive spatial motion (stiffness: 380, damping: 0.8).
expressiveSpatialFast → const M3EMotion
Fast expressive spatial motion (stiffness: 800, damping: 0.6).
expressiveSpatialSlow → const M3EMotion
Slow expressive spatial motion (stiffness: 200, damping: 0.8).
standardEffectsDefault → const M3EMotion
Default effects motion (stiffness: 1600, damping: 1).
standardEffectsFast → const M3EMotion
Fast effects motion (stiffness: 3800, damping: 1).
standardEffectsSlow → const M3EMotion
Slow effects motion (stiffness: 800, damping: 1).
standardSpatialDefault → const M3EMotion
Default spatial motion (stiffness: 700, damping: 0.9).
standardSpatialFast → const M3EMotion
Fast spatial motion (stiffness: 1400, damping: 0.9).
standardSpatialSlow → const M3EMotion
Slow spatial motion (stiffness: 300, damping: 0.9).