From 82bd4ef93437e317cb1fe000bd5f84ee774e6011 Mon Sep 17 00:00:00 2001 From: nvshah Date: Sat, 4 May 2024 18:23:38 +0530 Subject: [PATCH] fix: logic - respect latest field initial value instead of assigning it old field value TASK #1388 --- lib/src/form_builder.dart | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/src/form_builder.dart b/lib/src/form_builder.dart index 040030fc5..22df88894 100644 --- a/lib/src/form_builder.dart +++ b/lib/src/form_builder.dart @@ -213,11 +213,7 @@ class FormBuilderState extends State { _fields[name] = field; field.registerTransformer(_transformers); - - field.setValue( - oldField?.value ?? (_instantValue[name] ??= field.initialValue), - populateForm: false, - ); + _instantValue[name] = field.initialValue; } void unregisterField(String name, FormBuilderFieldState field) {