You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimenting with wrapping BlockPicker to use as reactive_forms control.
It seems that BlockPicker lacks of null value support for pickerColor value.
The form initial state could be empty(if creating a new record) - currently pickerColor: null causes an error so it requires to make pickerColor: value ?? Colors.transparent.
The other thing is lack of uncheck support for the picker.
The text was updated successfully, but these errors were encountered:
My walk around is to pass to pickerColor any color value that isn't defined in your avaliableColors list.
However, my solution should thorw an error so I hope it's just a temporary solution.
Imo passing null value to pickerColor is a must, as starting with empy state is something obvoius.
Drowback of my solution.
In my case choosing a color is obligatory for a user. So primary I pass any random color that isn't on the list. On submiting the form I check if the valu has changed. You have to add such check also.
Hi. Thanks for your work.
I'm experimenting with wrapping
BlockPicker
to use asreactive_forms
control.It seems that
BlockPicker
lacks ofnull
value support forpickerColor
value.The form initial state could be empty(if creating a new record) - currently
pickerColor: null
causes an error so it requires to makepickerColor: value ?? Colors.transparent
.The other thing is lack of
uncheck
support for the picker.The text was updated successfully, but these errors were encountered: