Springs class abstract final

The set of springs in the Material specification.

Material 3 Expressive motion uses springs, grouped into two motion schemes. The standard scheme eases into place with minimal bounce, and suits more utilitarian products. The expressive scheme overshoots and bounces into place, and suits hero moments and key interactions.

Each scheme has springs for two types of motion, in three speeds: default, fast, and slow.

  • Spatial springs animate movement, such as position, size, rotation, and corner radius.
  • Effects springs animate properties that shouldn't overshoot, such as color and opacity.

Most motion should use the default speed. Smaller elements can use the fast speed, and larger elements can use the slow speed.

Material spring tokens define a stiffness and a damping ratio, but no mass. The Material token named damping is the damping ratio (ζ), not SpringDescription.damping. Each constant is the same as SpringDescription.withDampingRatio with a mass of 1.0 and the token's stiffness and damping ratio, so its damping is ratio * 2.0 * sqrt(stiffness). For example, standardDefaultSpatial has a damping of 0.9 * 2.0 * sqrt(700.0), about 47.62.

Use them with a SpringSimulation, for example through AnimationController.animateWith.

See also:

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Constants

expressiveDefaultEffects → const SpringDescription
The expressive default effects spring in the Material specification.
expressiveDefaultSpatial → const SpringDescription
The expressive default spatial spring in the Material specification.
expressiveFastEffects → const SpringDescription
The expressive fast effects spring in the Material specification.
expressiveFastSpatial → const SpringDescription
The expressive fast spatial spring in the Material specification.
expressiveSlowEffects → const SpringDescription
The expressive slow effects spring in the Material specification.
expressiveSlowSpatial → const SpringDescription
The expressive slow spatial spring in the Material specification.
standardDefaultEffects → const SpringDescription
The standard default effects spring in the Material specification.
standardDefaultSpatial → const SpringDescription
The standard default spatial spring in the Material specification.
standardFastEffects → const SpringDescription
The standard fast effects spring in the Material specification.
standardFastSpatial → const SpringDescription
The standard fast spatial spring in the Material specification.
standardSlowEffects → const SpringDescription
The standard slow effects spring in the Material specification.
standardSlowSpatial → const SpringDescription
The standard slow spatial spring in the Material specification.