Skip to content

[material_ui] Add Material motion springs - #13338

Merged
auto-submit[bot] merged 9 commits into
flutter:mainfrom
QuncCccccc:material-ui-motion-tokens
Nov 7, 2026
Merged

auto-submit[bot] merged 9 commits into
flutter:mainfrom
QuncCccccc:material-ui-motion-tokens

Conversation

@QuncCccccc

@QuncCccccc QuncCccccc commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds Springs, a set of SpringDescription constants created from the Material 3 Expressive motion tokens (md.sys.motion.spring.*).

Material spring tokens define a stiffness and a damping ratio, but no mass. Each constant uses a mass of 1.0, so it's the same as SpringDescription.withDampingRatio with the token's values. They're generated by a new MotionTemplateM3E in gen_defaults.

This PR doesn't change any component.
Fixes flutter/flutter#184932

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

Explain the motion schemes, spring types, and speeds in the MotionSprings docs, list each spring's stiffness and damping ratio, stop using the number helper, tighten the gen_defaults test, and add a pending changelog.
…emplate

Springs matches the other Material token catalogs, such as Durations and Curves, and is part of the Material 3 Expressive motion system, so it is now generated by MotionTemplateM3E into motion_defaults_m3e.g.dart. MotionTemplateM3 and motion_defaults_m3.g.dart are unchanged from main.
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Oct 19, 2026
@QuncCccccc QuncCccccc changed the title Material UI motion tokens [material_ui] Add Material motion springs Nov 3, 2026
@QuncCccccc QuncCccccc added the CICD Run CI/CD label Nov 3, 2026
@QuncCccccc
QuncCccccc marked this pull request as ready for review November 3, 2026 01:14
@QuncCccccc
QuncCccccc requested a review from elliette November 3, 2026 01:14

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Material 3 Expressive spring tokens for standard and expressive motion schemes, generating them via a new MotionTemplateM3E template and exposing them in Springs. It also adds corresponding unit tests. Feedback on the changes points out a missing import of package:flutter/physics.dart in motion.dart, which is required for SpringDescription and will cause a compilation error.

@elliette elliette left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay here, looks great!

@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 7, 2026
@auto-submit
auto-submit Bot merged commit cd99c3d into flutter:main Nov 7, 2026
13 checks passed
definev pushed a commit to definev/flutter that referenced this pull request Nov 9, 2026
…6210)

flutter/packages@63881f9...565c657

2026-11-08 [email protected] Roll Flutter from
e36b370 to acade0f (1 revision) (flutter/packages#13590)
2026-11-07 [email protected] [material_ui] Fix
DropdownMenu losing text cursor when re-enabled (flutter/packages#13179)
2026-11-07 [email protected] Roll Flutter from
09175cd to e36b370 (22 revisions) (flutter/packages#13586)
2026-11-07 [email protected] [material_ui]
Add Material motion springs (flutter/packages#13338)
2026-11-06 [email protected] [material_ui] Paint
the active RoundedRectSliderTrackShape segment on top in RTL
(flutter/packages#13225)
2026-11-06 [email protected] [pigeon] Replace Experimental with
Preview (flutter/packages#13579)
2026-11-06 [email protected] [material_ui] Fix minimum width
for Material 3 primary tab indicator (flutter/packages#13322)
2026-11-06 [email protected]
[material_ui] Dispose drag-end CurvedAnimation in modal bottom sheet
(flutter/packages#13167)
2026-11-06 [email protected] [camera_web] Re: Support for camera
stream on web (flutter/packages#7950)
2026-11-06 [email protected] Roll Flutter from
3623d2d to 09175cd (61 revisions) (flutter/packages#13578)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

M3 Expressive: Motion-physics system

2 participants