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.
1 parent 50f5645 commit 604cea7Copy full SHA for 604cea7
lib/src/form_builder.dart
@@ -221,7 +221,11 @@ class FormBuilderState extends State<FormBuilder> {
221
}
222
223
void unregisterField(String name, FormBuilderFieldState field) {
224
- assert(_fields.containsKey(name));
+ assert(
225
+ _fields.containsKey(name),
226
+ 'Failed to unregister a field. Make sure that all field names in a form are unique.',
227
+ );
228
+
229
// Only remove the field when it is the one registered. It's possible that
230
// the field is replaced (registerField is called twice for a given name)
231
// before unregisterField is called for the name, so just emit a warning
0 commit comments