Skip to content

Commit 7f32a3b

Browse files
Merge pull request #48 from grundid/initialValue_fix
fix issue with initialValue not taken from form initialValues
2 parents de87c7e + 2c924a8 commit 7f32a3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/form_builder_file_picker.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class FormBuilderFilePicker extends FormBuilderField<List<PlatformFile>> {
7777
Key? key,
7878
required String name,
7979
FormFieldValidator<List<PlatformFile>>? validator,
80-
List<PlatformFile> initialValue = const [],
80+
List<PlatformFile>? initialValue,
8181
InputDecoration decoration = const InputDecoration(),
8282
ValueChanged<List<PlatformFile>?>? onChanged,
8383
ValueTransformer<List<PlatformFile>?>? valueTransformer,
@@ -190,7 +190,7 @@ class _FormBuilderFilePickerState
190190
@override
191191
void initState() {
192192
super.initState();
193-
_files = widget.initialValue ?? [];
193+
_files = initialValue ?? [];
194194
}
195195

196196
Future<void> pickFiles(

0 commit comments

Comments
 (0)