Skip to content

Commit

Permalink
Merge pull request #85 from TopiaAmr/main
Browse files Browse the repository at this point in the history
Solving app crashes on some Huawei phones
  • Loading branch information
deandreamatias authored Aug 18, 2024
2 parents 9117a2b + 756efb6 commit 4b85c34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/form_builder_file_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class FormBuilderFilePicker
/// Whether to allow file compression
final bool allowCompression;

final int compressionQuality;

/// If [withData] is set, picked files will have its byte data immediately available on memory as [Uint8List]
/// which can be useful if you are picking it for server upload or similar.
final bool withData;
Expand Down Expand Up @@ -101,6 +103,7 @@ class FormBuilderFilePicker
this.allowedExtensions,
this.onFileLoading,
this.allowCompression = true,
this.compressionQuality = 30,
this.customFileViewerBuilder,
this.customTypeViewerBuilder})
: super(
Expand Down Expand Up @@ -180,6 +183,7 @@ class _FormBuilderFilePickerState extends FormBuilderFieldDecorationState<
type: fileType,
allowedExtensions: widget.allowedExtensions,
allowCompression: widget.allowCompression,
compressionQuality: widget.compressionQuality,
onFileLoading: widget.onFileLoading,
allowMultiple: widget.allowMultiple,
withData: widget.withData,
Expand Down

0 comments on commit 4b85c34

Please sign in to comment.