cetorres / multiselect_formfield

A Flutter package that provides a multi select form field using alert dialog to select multiple items with checkboxes and showing as chips.
BSD 3-Clause "New" or "Revised" License
72 stars 59 forks source link

When providing default value on load the validator is always null #9

Closed DavidCorrado closed 4 years ago

DavidCorrado commented 4 years ago

Summary: So if you use your example code. Then set a default value of the drop down. If you press save the form validation returns null thus failing validation.

Steps to reproduce 1) So in your example if you change the empty array here https://github.com/cetorres/multiselect_formfield/blob/99b313e78d403d349472a2def28ffd021dd5b4db/example/lib/main.dart#L28 To be _myActivities = ["Running"]; 2) Load the example and press save Expected: Validation passes and shows array below. Actual: Validation fails because value in validation is null