[material_ui] Port flutter/flutter #189345 "Fix todayBorder color being overridden by todayForegroundColor in YearPicker" - #12697
Open
Massinissa-Mouhoub wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request ensures that DatePickerThemeData.todayBorder is respected over todayForegroundColor in the year selector of the date picker. It updates the border color logic in _YearPickerState, updates the documentation, and adds corresponding regression tests. Feedback on the tests suggests correcting a test description that incorrectly references todayBackgroundColor instead of todayForegroundColor.
| } | ||
|
|
||
| // Regression test for https://github.com/flutter/flutter/issues/189298 | ||
| testWidgets('Non-null todayBorder color should be respected over todayBackgroundColor', ( |
Contributor
There was a problem hiding this comment.
The test description mentions todayBackgroundColor, but the test actually verifies that todayBorder is respected over todayForegroundColor. We should update the description to match the actual behavior being tested.
Suggested change
| testWidgets('Non-null todayBorder color should be respected over todayBackgroundColor', ( | |
| testWidgets('Non-null todayBorder color should be respected over todayForegroundColor', ( |
Draft
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports flutter/flutter#189345 from flutter/flutter to flutter/packages, as part of flutter/flutter#188444.
Fixes flutter/flutter#189298
YearPickerunconditionally overwroteDatePickerThemeData.todayBorder's color with the resolvedtodayForegroundColor, so a custom border color was ignored. The border color is now kept when it is set to a non-transparent color, and the existing fallback totodayForegroundColoris preserved for transparent borders.