ExpressiveMotion class
Centralised transition motion tokens (easing curves + durations) for Material 3 motion.
M3 runs two motion systems and this class is the transitions half
(curves + durations, for screen/element entrances and exits). The
motion-physics half — springs for component/state interaction — lives in
ExpressiveSpringScheme (spring_scheme.dart).
Expressive but disciplined: motion settles, it does not oscillate. Animation signals state and rewards the key action, it never bounces for show. Widgets read these tokens instead of inlining their own durations/curves so an app shares one motion language and a single tuning point.
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
Static Methods
-
durationOf(
BuildContext context, Duration duration) → Duration -
Returns
duration, or Duration.zero when the platform/user has asked for reduced motion — call sites then snap straight to the end state. Always gate animated widgets through this.
Constants
- emphasized → const Curve
-
The genuine M3 emphasized curve — a two-segment
ThreePointCubic(accelerate → decelerate), for the boldest single begin-and-end-on-screen moment (in-place state morphs: selection, expand). NOT a singleCubic; that trap maps to standard. - emphasizedAccelerate → const Curve
- M3 emphasized-accelerate (alias of exit).
- emphasizedDecelerate → const Curve
- M3 emphasized-decelerate (alias of enter) — explicit name for transitions that bring something onto the screen.
- enter → const Curve
- Entrances rise-and-fade in on this. M3 emphasized-decelerate — the curve for an element entering the screen.
- entrance → const Duration
-
One-shot entrances (list items, screen sections, a hero card).
≈ M3
Durations.medium3(350ms). - exit → const Curve
- Exits. M3 emphasized-accelerate — the curve for an element leaving.
- press → const Duration
-
Press / tap feedback. ≈ M3
Durations.short3(150ms). - routeEnter → const Duration
- Route enter (a screen arriving). M3 pair: Emphasized-decelerate @ 400ms.
- routeExit → const Duration
- Route exit (a screen leaving). M3 pair: Emphasized-accelerate @ 200ms.
- settle → const Duration
-
In-place state changes (chip selection, card status, expand/collapse).
≈ M3
Durations.medium1(250ms). - standard → const Curve
- M3 standard easing — utilitarian, begins-and-ends-on-screen.