TaimoorHassan / multiselect

A simple DropDown widget with multiselect enabled by default
https://pub.dev/packages/multiselect
BSD 3-Clause "New" or "Revised" License
10 stars 63 forks source link

Validator FIx #33

Open dronzuone opened 1 year ago

dronzuone commented 1 year ago

Hi would it be possible to add a validator as a nullable type. This would fix the validation issue.

Current implementation: final String Function(T? selectedOptions)? validator;

Changed to: final String? Function(T? selectedOptions)? validator;

Example of using the validator after fix: validator: (value) => value == null ? 'Empty' : null,

Instead: validator: (value) => value == null ? 'Empty' : '',

soufianebenyaala commented 5 months ago

up