MotionAccessibility class

Accessibility-aware motion utilities.

Respects MediaQuery.disableAnimations and provides reduced-motion alternatives.

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

adaptiveCurve(BuildContext context, Curve normal) Curve
Returns Curves.linear if motion is disabled, otherwise normal.
adaptiveDuration(BuildContext context, Duration normal) Duration
Get an appropriate duration — returns Duration.zero if motion is disabled.
adaptiveSpring(BuildContext context, ExpressiveSpring normal) ExpressiveSpring
Get an appropriate spring — returns a critically-damped (no bounce) spring if motion should be reduced.
duration(BuildContext context, {Duration normal = const Duration(milliseconds: 300), Duration reduced = Duration.zero}) Duration
Convenience: wrap a duration based on system setting. Useful for AnimatedContainer, AnimatedOpacity, etc.
shouldReduceMotion(BuildContext context) bool
Check if animations should be reduced.