Repository navigation
[material_ui] Migrate M3 Time Picker template to use new gen_defaults - #13164
Conversation
|
Like the other PRs migrating to use the new gen_defaults, this doesn't require a version and changelog |
There was a problem hiding this comment.
Code Review
This pull request migrates the Material 3 TimePicker defaults generation to the token-based template system. It extracts the _TimePickerDefaultsM3 class from time_picker.dart into a generated file, updates time_picker_template.dart to utilize TokenTimePicker tokens, enables the generator script, and adds corresponding tests. There are no review comments, so I have no feedback to provide.
f8d3ee6 to
d4a7d48
Compare
d4a7d48 to
03cef86
Compare
03cef86 to
0c2d00e
Compare
| @@ -20,10 +15,16 @@ class TimePickerTemplate extends TokenTemplate { | |||
| static const String variant = ''; | |||
There was a problem hiding this comment.
These are unused anymore. Let's remove them.
| // import '../templates/time_picker_template.dart'; | ||
| import '../templates/time_picker_template.dart'; |
There was a problem hiding this comment.
These 2 lines are duplicated. Please remove one.
There was a problem hiding this comment.
Oops, sorry about that, fixed in Remove commented duplicated import
0c2d00e to
c9c06f2
Compare
QuncCccccc
left a comment
There was a problem hiding this comment.
LGTM with just one more comment! Thanks a lot!
| @override | ||
| double get elevation { | ||
| return ${elevation("$tokenGroup.container")}; | ||
| return ${number(TokenTimePicker.containerElevation)}; |
There was a problem hiding this comment.
No need to wrap numeric tokens in number(...) — interpolating ${TokenTimePicker.containerElevation} directly produces the exact same output and can make code simpler and cleaner (same for the other number(...) calls in this file).
There was a problem hiding this comment.
Sure! I removed it in Remove usages or number
# Conflicts: # packages/material_ui/tool/gen_defaults/bin/gen_defaults.dart
c9c06f2 to
aacbfe0
Compare
flutter/packages@1df8447...670b30e 2026-11-04 [email protected] [material_ui] Inherit `IconButtonThemeData.variant` from enclosing themes (flutter/packages#13263) 2026-11-04 [email protected] [tool] Regenerate `MockGitDir` for `package:git` 2.5.0 (flutter/packages#13544) 2026-11-03 [email protected] [material_ui] Fix discrete Slider selecting the neighboring tick near the track ends (flutter/packages#12927) 2026-11-03 [email protected] [material_ui] Migrate M3 Time Picker template to use new gen_defaults (flutter/packages#13164) 2026-11-03 [email protected] [camera_android_camerax] Update skills_lint to 0.5.3 (flutter/packages#13530) 2026-11-03 [email protected] Roll Flutter from fcfb4f2 to 9347202 (38 revisions) (flutter/packages#13540) 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#188439
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.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