-
-
Notifications
You must be signed in to change notification settings - Fork 541
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
Multiple widgets using the same GlobalKey #193
Comments
I found a fix, but am not sure I understand why. By renaming the field from key to fbKey, it all worked. I am only passing that value to FormBuilder, so not sure why that would make a difference? |
FormBuilder works well with a GlobalKey, this allows you to have a handle on its state. Also, note that your field attribute names (i.e. |
Hi, I also face this error with the FormBuilder used in two different stateful widgets. Declared like in the example:
This immediately gives me an error:
The proposals from this Stackoverview question did not help. I don't think that this is related to flutter_form_builder. Looks like GlobalKey is considered to be the same by flutter. Anyway, I wanted to let you know and maybe you found a solution for this or know what I'm doing wrong.. |
Ok, forget about it. I accidentally was INDEED using the key twice! |
I am trying to wrap the form builder in a routine which generates the form dynamically from a set of form field descriptors, but am getting the above error.
Here is the code:
The key is being generated in the parent class outside of the build function.
What am I missing/doing wrong?
The text was updated successfully, but these errors were encountered: