We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8041a11 + f80bfe7 commit b0c4c64Copy full SHA for b0c4c64
lib/src/form_builder.dart
@@ -214,8 +214,12 @@ class FormBuilderState extends State<FormBuilder> {
214
_fields[name] = field;
215
field.registerTransformer(_transformers);
216
217
+ if (widget.clearValueOnUnregister || (_instantValue[name] == null)) {
218
+ _instantValue[name] = field.initialValue ?? initialValue[name];
219
+ }
220
+
221
field.setValue(
- (_instantValue[name] = field.initialValue ?? initialValue[name]),
222
+ _instantValue[name],
223
populateForm: false,
224
);
225
}
0 commit comments