flutter-form-builder-ecosystem / form_builder_file_picker

File picker field widget for FlutterFormBuilder.
https://pub.dev/packages/form_builder_file_picker
BSD 3-Clause "New" or "Revised" License
15 stars 33 forks source link

Setting maxFiles to null throwing Exception #4

Closed prashu1910 closed 4 years ago

prashu1910 commented 4 years ago

Issue:

If we want to remove "#of file uploaded / maxFiles" Text from UI then we have to set maxFiles to null. Due to this ontap method of InkWell is throwing exception as it is trying to compare null with 0.

Stacktrace:

The following NoSuchMethodError was thrown building FormField<Map<String, String>>-[LabeledGlobalKey<FormFieldState>#b647b](dirty, dependencies: [_FormScope], state: FormFieldState<Map<String, String>>#2c7ea): The method '<=' was called on null. Receiver: null Tried calling: <=(0)

_FormBuilderFilePickerState.build. (package:form_builder_file_picker/src/form_builder_form_picker.dart:108:62)