File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class TypeSelector {
24
24
final FileType type;
25
25
final Widget selector;
26
26
27
- TypeSelector ({required this .type, required this .selector});
27
+ const TypeSelector ({required this .type, required this .selector});
28
28
}
29
29
30
30
/// Field for image(s) from user device storage
@@ -91,8 +91,13 @@ class FormBuilderFilePicker extends FormBuilderField<List<PlatformFile>> {
91
91
this .withReadStream = false ,
92
92
this .allowMultiple = false ,
93
93
this .previewImages = true ,
94
- this .selector = const Icon (Icons .add_circle),
95
- this .type = FileType .any,
94
+ @Deprecated ("please use typeSelectors for better picker and file type control" )
95
+ this .selector = const Icon (Icons .add_circle),
96
+ @Deprecated ("please use typeSelectors for better picker and file type control" )
97
+ this .type = FileType .any,
98
+ // TODO: once the above fields are removed typeSelectors should be made not null and initialized as
99
+ // const [TypeSelector(type: FileType.any, selector: Icon(Icons.add_circle))]
100
+ // the typeSelectorList variable can be then removed and we can use typeSelectors directly
96
101
this .typeSelectors,
97
102
this .allowedExtensions,
98
103
this .onFileLoading,
You can’t perform that action at this time.
0 commit comments