Skip to content

Commit 3827b09

Browse files
committed
Added keys to the date, time and dateTime pickers
1 parent 5e25840 commit 3827b09

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/form_builder.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ class _FormBuilderState extends State<FormBuilder> {
228228

229229
case FormBuilderInput.TYPE_DATE_TIME_PICKER:
230230
return DateTimePickerFormField(
231+
key: Key(formControl.attribute),
231232
inputType: InputType.both,
232233
initialValue: formControl.value,
233234
format: formControl.format != null
@@ -254,6 +255,7 @@ class _FormBuilderState extends State<FormBuilder> {
254255

255256
case FormBuilderInput.TYPE_DATE_PICKER:
256257
return DateTimePickerFormField(
258+
key: Key(formControl.attribute),
257259
inputType: InputType.date,
258260
initialValue: formControl.value,
259261
format: formControl.format != null
@@ -280,6 +282,7 @@ class _FormBuilderState extends State<FormBuilder> {
280282

281283
case FormBuilderInput.TYPE_TIME_PICKER:
282284
return DateTimePickerFormField(
285+
key: Key(formControl.attribute),
283286
inputType: InputType.time,
284287
initialValue: formControl.value,
285288
format: formControl.format != null

0 commit comments

Comments
 (0)