From 1c86e722f36be410aa39af2f458efb2209dabdec Mon Sep 17 00:00:00 2001 From: Vasiliy Ditsyak Date: Tue, 5 Nov 2024 14:50:56 +0100 Subject: [PATCH] reactive_file_picker 3.0.3 --- packages/reactive_file_picker/CHANGELOG.md | 4 ++++ packages/reactive_file_picker/lib/multi_file.dart | 4 ++-- packages/reactive_file_picker/pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/reactive_file_picker/CHANGELOG.md b/packages/reactive_file_picker/CHANGELOG.md index d1f20bd..aa149bb 100644 --- a/packages/reactive_file_picker/CHANGELOG.md +++ b/packages/reactive_file_picker/CHANGELOG.md @@ -1,3 +1,7 @@ +## [3.0.3] + +* MultiFile.fromFiles allow null + ## [3.0.2] * MultiFile.fromFile factory method diff --git a/packages/reactive_file_picker/lib/multi_file.dart b/packages/reactive_file_picker/lib/multi_file.dart index 395548a..ee060a8 100644 --- a/packages/reactive_file_picker/lib/multi_file.dart +++ b/packages/reactive_file_picker/lib/multi_file.dart @@ -12,8 +12,8 @@ class MultiFile with _$MultiFile { @Default([]) List platformFiles, }) = _MultiFile; - factory MultiFile.fromFiles(List files) => MultiFile( - files: files.whereType().toList(), + factory MultiFile.fromFiles(List? files) => MultiFile( + files: (files ?? []).whereType().toList(), ); factory MultiFile.fromFile(T? file) => MultiFile( files: [file].whereType().toList(), diff --git a/packages/reactive_file_picker/pubspec.yaml b/packages/reactive_file_picker/pubspec.yaml index a497504..ffb6a43 100644 --- a/packages/reactive_file_picker/pubspec.yaml +++ b/packages/reactive_file_picker/pubspec.yaml @@ -1,6 +1,6 @@ name: reactive_file_picker description: Wrapper around file_picker to use with reactive_forms. -version: 3.0.2 +version: 3.0.3 repository: https://github.com/artflutter/reactive_forms_widgets/tree/master/packages/reactive_file_picker issue_tracker: https://github.com/artflutter/reactive_forms_widgets/issues