File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ class FormBuilderFilePicker
5858 /// Whether to allow file compression
5959 final bool allowCompression;
6060
61+ final int compressionQuality;
62+
6163 /// If [withData] is set, picked files will have its byte data immediately available on memory as [Uint8List]
6264 /// which can be useful if you are picking it for server upload or similar.
6365 final bool withData;
@@ -101,6 +103,7 @@ class FormBuilderFilePicker
101103 this .allowedExtensions,
102104 this .onFileLoading,
103105 this .allowCompression = true ,
106+ this .compressionQuality = 30 ,
104107 this .customFileViewerBuilder,
105108 this .customTypeViewerBuilder})
106109 : super (
@@ -180,6 +183,7 @@ class _FormBuilderFilePickerState extends FormBuilderFieldDecorationState<
180183 type: fileType,
181184 allowedExtensions: widget.allowedExtensions,
182185 allowCompression: widget.allowCompression,
186+ compressionQuality: widget.compressionQuality,
183187 onFileLoading: widget.onFileLoading,
184188 allowMultiple: widget.allowMultiple,
185189 withData: widget.withData,
You can’t perform that action at this time.
0 commit comments