Repository navigation
[material_ui] Migrate M3 Slider template to use new gen_defaults - #13195
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the Material 3 Slider defaults to be generated from the token database. It adds the SliderTemplateM3 template to generate slider_defaults_m3.g.dart, removes the manually maintained _SliderDefaultsM3 class from slider.dart, and enables the generator script and its corresponding tests. There are no review comments, and I have no feedback to provide.
QuncCccccc
left a comment
There was a problem hiding this comment.
Thank you for your contribution! Because of the volume of PRs we receive, we require that new contributors use our checklist to guide them through critical steps in creating a Flutter PR, and complete all of the items in the PR checklist above. Once all items have been checked, we will move forward on PR review. Thanks again.
|
hi! i updated the checklist, and everything is following the rules stablished such as styles, linter, ai, testing and changeling :) @QuncCccccc also updated the branch with the latest changes on the base branch. |
QuncCccccc
left a comment
There was a problem hiding this comment.
Overall looks really good! Thanks a lot for your contribution! Just left one comment.
| ''' | ||
| class $className extends SliderThemeData { | ||
| $className(this.context) | ||
| : super(trackHeight: ${number(TokenSlider.activeTrackHeight)}); |
There was a problem hiding this comment.
Since number() currently only calls toString() and these token values are already numeric, could we remove these number() helper? This simplifies the template while keeping the generated output unchanged:).
There was a problem hiding this comment.
now that you mention, yes. I used the number() as a safety-net. But I agree, it'll be removed on the next commit
QuncCccccc
left a comment
There was a problem hiding this comment.
LGTM. Thank you for helping the migration!
elliette
left a comment
There was a problem hiding this comment.
LGTM with one suggestion, thank you!
flutter/packages@108dad0...23a05b6 2026-10-23 [email protected] [video_player] Fix crash regression with async calls on iOS/macOS (flutter/packages#13383) 2026-10-23 [email protected] [material_ui] Migrate M3 SegmentedButton template to use new gen_defaults (flutter/packages#13227) 2026-10-23 [email protected] [material_ui] Migrate M3 Slider template to use new gen_defaults (flutter/packages#13195) 2026-10-23 [email protected] [material_ui] Migrate M3 BottomAppBar template to use new gen_defaults (flutter/packages#13385) 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
flutter/packages@108dad0...23a05b6 2026-10-23 [email protected] [video_player] Fix crash regression with async calls on iOS/macOS (flutter/packages#13383) 2026-10-23 [email protected] [material_ui] Migrate M3 SegmentedButton template to use new gen_defaults (flutter/packages#13227) 2026-10-23 [email protected] [material_ui] Migrate M3 Slider template to use new gen_defaults (flutter/packages#13195) 2026-10-23 [email protected] [material_ui] Migrate M3 BottomAppBar template to use new gen_defaults (flutter/packages#13385) 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
Work toward flutter/flutter#187899
Fixes flutter/flutter#188433
Migrates the M3 Slider template to the new
gen_defaults. The generated defaults are unchanged. The first commit only moves the files out oftemporarily_excluded/.activeTickMarkColorandinactiveTickMarkColorstill use.withOpacity(1.0)instead ofcolorWithOpacity, because that helper drops it when opacity is 1.0 and the output would change.No version bump or changelog since there's no change for users, same as the other template migrations.
Pre-Review Checklist
[shared_preferences]///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2