-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Allow date pickers to not have selected date #132343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't DatePicker.initialEntryMode also need to be updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change the key explanations are really useful; I'm not sure that most developers would appreciate what you mean otherwise.
As far as I can tell it's already doing the right thing. If you mean the documentation, then I did try to update it but I wasn't really sure what it should say. I don't want to recommend resetting the key just to change the mode because that'll reset everything else as well which seems rather disruptive (compared to when changing the selected date, where you kind of want to be resetting everything? I think?). |
This enables our various date picker classes to have a null `initialDate`. It also fixes the logic of some of the widgets which used to do something when you _changed_ the `initial*` parameters, which is wrong for `initial*` properties (they by definition should only impact the initial state) and wrong for properties in general (behaviour should not change based on whether the widget was built with a new value or not, that violates the reactive design principles).
|
I updated the branch and will mark it to land on green but feel free to remove the autosubmit label if you have a particular thing you'd like me to change for initialEntryMode. |
|
The |
|
auto label is removed for flutter/flutter/132343, due to - The status or check suite Linux web_tests_5 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
This enables our various date picker classes to have a null
initialDate.It also fixes the logic of some of the widgets which used to do something when you changed the
initial*parameters, which is wrong forinitial*properties (they by definition should only impact the initial state) and wrong for properties in general (behaviour should not change based on whether the widget was built with a new value or not, that violates the reactive design principles).Fixes #638.