Add DropdownButtonFormField value param test#170518
Add DropdownButtonFormField value param test#170518auto-submit[bot] merged 4 commits intoflutter:masterfrom
Conversation
60ff254 to
7dd90cb
Compare
|
Should this have an issue? Never seen a PR that just adds a test. |
bleroux
left a comment
There was a problem hiding this comment.
Thanks for filing this PR!
This test is badly required as no existing test is checking the reset function and the mapping of DropdownButtonFormField.value to FormFieldState.initialValue.
I wrote some suggestions to improve readability.
In that particular case, you can link to #170050, it is the best way to give context to reviewers and future contributors. On a side note, it is true that PRs that just add tests are not common, but it is always useful to improve test coverage (I filed several PRs to add mlssing M3 tests for InputDecoration and still need to file some 😅 ) |
|
I've made the requested changes, please take a look. |
Co-authored-by: Bruno Leroux <[email protected]>
justinmc
left a comment
There was a problem hiding this comment.
LGTM 👍 Thanks for following up from the other PR to make this test change.
This PR adds a new test that verifies that the value param is only used on initial build and when resetting the field. Test for flutter#170050 (comment) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Bruno Leroux <[email protected]>
This PR adds a new test that verifies that the value param is only used on initial build and when resetting the field.
Test for #170050 (comment)
Pre-launch Checklist
///).