Skip to content

Commit b60c345

Browse files
committed
Assert initialValue is null or controller is null for FormBuilderTextField. Closes #258
1 parent 8224390 commit b60c345

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/fields/form_builder_text_field.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ class FormBuilderTextField extends StatefulWidget {
8787
this.showCursor,
8888
this.onSaved,
8989
this.onTap,
90-
}) : super(key: key);
90+
}) : assert(initialValue == null || controller == null),
91+
super(key: key);
9192

9293
@override
9394
FormBuilderTextFieldState createState() => FormBuilderTextFieldState();

0 commit comments

Comments
 (0)