Motion configuration
Each motion role contains a duration and curve together:
final motion = const MotionTokens().copyWith(
feedback: const MotionSpec(
duration: Duration(milliseconds: 100),
curve: Curves.easeOut,
),
);
final themed = light.copyWith(motion: light.motion.copyWith(tokens: motion));
// Inside a widget:
final spec = context.theme.motion.resolve(
context,
preset: MotionPreset.feedback,
);Roles include feedback, transition, expansion, navigation, navigationExit,
spinner and progress. resolve accepts per-widget duration and curve overrides.
Disabling theme motion or the platform's disableAnimations accessibility setting
resolves transient motion to zero duration and linear easing. Repeating indicators
stop while motion is disabled. Navigation retains continuous opacity when an
entrance is interrupted by a pop.
Dialog.show uses IosDialogMotion by default: the dialog springs from 1.3 times
its size while fading in, then fades out without changing size. An interrupted
entrance dismisses from its last painted size. Dialog styling and the blurred
backdrop are preserved, and reduced motion presents the dialog immediately.
Use the theme's MotionTheme.dialog, a MotionScope override, or the dialog's
motion argument to replace the recipe. Custom DialogMotion recipes keep their
duration-based timing unless they supply a physical createSimulation driver.