You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the FormBuilder.onChanged fires, the FormBuilderState.fields collection contains ONLY the field "b_dropdown" (the last childwidget to build).
A runtime warning is output "flutter: Warning! Replacing duplicate Field for a_dropdown -- this is OK to ignore as long as the field was intentionally replaced"
Expected Behavior
When the FormBuilder.onChanged fires, the FormBuilderState.fields collection should contain BOTH the fields "a_dropdown" and "b_dropdown".
Steps To Reproduce
On any environment, create a widget tree where a child widget (in my example I've called the class ChildWidget) is used multiple times in the same form.
The child widget should contain a FormBuilder form field, but it uses some unique name (i.e passed by argument) to name the field.
It appears that the FormBuilder subsystem is perhaps using the widget tree to identify form fields, because the last ChildWidget to render will have its formfields added to the FormBuilder.fields collection, overwriting the previous ones.
Aditional information
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Package/Plugin version
9.1.1
Platforms
Flutter doctor
Flutter doctor
Minimal code example
Code sample (pseudocode)
Current Behavior
When the FormBuilder.onChanged fires, the FormBuilderState.fields collection contains ONLY the field "b_dropdown" (the last childwidget to build).
A runtime warning is output "flutter: Warning! Replacing duplicate Field for a_dropdown -- this is OK to ignore as long as the field was intentionally replaced"
Expected Behavior
When the FormBuilder.onChanged fires, the FormBuilderState.fields collection should contain BOTH the fields "a_dropdown" and "b_dropdown".
Steps To Reproduce
On any environment, create a widget tree where a child widget (in my example I've called the class ChildWidget) is used multiple times in the same form.
The child widget should contain a FormBuilder form field, but it uses some unique name (i.e passed by argument) to name the field.
It appears that the FormBuilder subsystem is perhaps using the widget tree to identify form fields, because the last ChildWidget to render will have its formfields added to the FormBuilder.fields collection, overwriting the previous ones.
Aditional information
No response
The text was updated successfully, but these errors were encountered: