MotionSpec class final
Per-theme motion tokens (spec §5.1 Motion; motion brief §2.3, §2.6). Integers only. Runtime adjustments (Reduce Motion, input amplitude, battery tier) are applied by the render layer and never stored here.
- Annotations
Constructors
- MotionSpec({required PressVerb verb, required MotionScheme scheme, required SpringToken pressIn, required SpringToken release, required EntryStyle entry, required ImpactStyle impact, SpringToken? releaseAlt, int depthCdp = 0, int scalePermille = 1000, int cornerPermille = 0, int squishPermille = 0, bool stateLayerSnap = false, int entryScalePermille = 1000, int entryOffsetCdp = 0, SpringToken? entrySpring, PressFx fx = PressFx.none, int stepMs = 0, int impactPermille = 800, bool releaseHaptic = false, int releaseImpactPermille = 0})
-
const
- MotionSpec.fromJson(Object? json)
-
factory
Properties
- cornerPermille → int
-
Pressed corner as a fraction of the short side × 1000 (M3E 300).
final
- depthCdp → int
-
dp × 100: translate depth (NeoPOP d), travel, or shadow size.
final
- entry → EntryStyle
-
final
- entryOffsetCdp → int
-
Display glyph entry start offset, dp × 100 (NeoPOP drop −600 → 0).
final
- entryScalePermille → int
-
Display glyph entry start scale × 1000 (M3E pop 850 → 1000).
final
- entrySpring → SpringToken?
-
Spring for the display entry (null = release).
final
- fx → PressFx
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- impact → ImpactStyle
-
Haptic profile: impact style and intensity × 1000 on touch-down.
final
- impactPermille → int
-
final
- pressIn → SpringToken
-
Press-in spring (never seeded: frame-1 feedback is identical across
themes of a family).
final
- release → SpringToken
-
Release spring (seeded × {0.9, 1.0, 1.1}).
final
- releaseAlt → SpringToken?
-
Second release spring: M3E corners, glass Y axis.
final
- releaseHaptic → bool
-
Also fire a haptic on release (NeoPOP, Retro).
final
- releaseImpactPermille → int
-
Release haptic intensity × 1000.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scalePermille → int
-
Pressed scale × 1000 (< 1000 shrinks, > 1000 inflates).
final
- scheme → MotionScheme
-
UI motion scale (
=, panels, theme shapes).final - squishPermille → int
-
M3E row-neighbour squish × 1000 of key width.
final
- stateLayerSnap → bool
-
Snap a state layer in frame 1 (M3E +10 %).
final
- stepMs → int
-
0 = continuous; Pixel samples at 67 ms.
final
- verb → PressVerb
-
final
Methods
-
copyWith(
{PressVerb? verb, MotionScheme? scheme, SpringToken? pressIn, SpringToken? release, SpringToken? releaseAlt, int? depthCdp, int? scalePermille, int? cornerPermille, int? squishPermille, bool? stateLayerSnap, EntryStyle? entry, int? entryScalePermille, int? entryOffsetCdp, SpringToken? entrySpring, PressFx? fx, int? stepMs, ImpactStyle? impact, int? impactPermille, bool? releaseHaptic, int? releaseImpactPermille}) → MotionSpec -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override