[go: nahoru, domu]

Skip to content
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

Rename Form Widgets for Clarity #1078

Merged
merged 1 commit into from
Jun 25, 2018
Merged

Conversation

brianegan
Copy link
Contributor

This attempts to address this issue: flutter/flutter#18304

Users reading the docs were using GlobalKey<MyFormState> instead of GlobalKey<FormState>. It's an easy mistake to make, since MyFormState and FormState look quite similar.

I've changed MyFormState to MyCustomFormState to hopefully make the two classes more distinct from one another, and added a note to the reader: You must use GlobalKey<FormState>.

Please let me know if you think this will help address the issue, or if you can think of something better :)

@googlebot googlebot added the cla: yes Contributor has signed the Contributor License Agreement label Jun 25, 2018
@Sfshaza
Copy link
Contributor
Sfshaza commented Jun 25, 2018

LGTM, Brian! It's much easier to read given the added length.

@Sfshaza Sfshaza merged commit 68fafb3 into flutter:master Jun 25, 2018
@brianegan brianegan deleted the form-clarity branch June 25, 2018 15:54
@jickay
Copy link
jickay commented Jun 25, 2018

Looks good to me. Just what happens when things are names similar things. Plus it's always hard to tell what is a name required by the framework and what is a custom one. Comment definitely helps to at least find the problem faster.

@brianegan
Copy link
Contributor Author

Thanks for the feedback @jickay and @Sfshaza!

@lordzyx
Copy link
lordzyx commented Apr 13, 2019

I absolutely agree! I really need "readonly" feature.
form validation doesn't work with disabled textformfield, and I need to validate a readonly field, which is editable only by a button. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Contributor has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants