Closed Saulmarti closed 2 years ago
@Saulmarti this is due to the issues with null safety migration
Hi guys, I have the same issue, Have you found a solution or maybe a workaround, thanks a lot if you provide some information regarding the solution to this issue. Thanks a lot.
Its also with single and onChange Method.
Error: Expected a value of type '((S2SingleSelected<String?>) => void)?', but got one of type '(S2SingleSelected
Hi, You may try to make it SmartSelect<String?>.multiple(..) instead of SmartSelect
Yup SmartSelect<String?>.multiple(..)
instead of SmartSelect.multiple<String>(..)
helps.
But it doesn't resolve problem.
I compared the code from the old package and this one. I don't know why @akbarpulatov did you make these changes but I revert them and now is ok.
Issue is fixed on 834321de79dbb2b61befcfa8ddd97c90d2569c55.
ERROR
type '(BuildContext, S2MultiState) => S2Tile' is not a subtype of type '((BuildContext, S2MultiState<String?>) => Widget)?'
SmartSelect<String>.multiple( title: translate('FILTER.genres'), selectedValue: widget.filters.generes, onChange: (selected) { setState(() => widget.filters.generes = selected!.value); }, choiceItems: options, placeholder: translate("FILTER.select_more"), modalType: S2ModalType.bottomSheet, tileBuilder: (context, state) { return S2Tile.fromState( state, isTwoLine: true, ); }, );