Skip to content

Commit a6cb9a2

Browse files
committed
fix null-safety issue with allowCompression
1 parent 8e3b88c commit a6cb9a2

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
@@ -48,7 +48,7 @@ class FormBuilderFilePicker extends FormBuilderField<List<PlatformFile>> {
4848
final void Function(FilePickerStatus)? onFileLoading;
4949

5050
/// Whether to allow file compression
51-
final bool? allowCompression;
51+
final bool allowCompression;
5252

5353
/// If [withData] is set, picked files will have its byte data immediately available on memory as [Uint8List]
5454
/// which can be useful if you are picking it for server upload or similar.
@@ -87,7 +87,7 @@ class FormBuilderFilePicker extends FormBuilderField<List<PlatformFile>> {
8787
this.type = FileType.any,
8888
this.allowedExtensions,
8989
this.onFileLoading,
90-
this.allowCompression,
90+
this.allowCompression = false,
9191
this.customFileViewerBuilder,
9292
}) : super(
9393
key: key,

0 commit comments

Comments
 (0)