-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
when I try to save data, onSaved is not working, I put some prints inside to verify, and is nos executing the function. So I edit the libreary locally and added one link in the onTap listener of the InkWell in the flutter_multiselect.dart, as follow:
return InkWell(
onTap: () async {
var results = await Navigator.push(
state.context,
MaterialPageRoute<dynamic>(
builder: (BuildContext context) => SelectionModal(
filterable: filterable,
valueField: valueField,
textField: textField,
dataSource: dataSource,
values: state.value ?? []),
fullscreenDialog: true,
));
if (results != null) {
if (results.length > 0) {
state.didChange(results);
} else {
state.didChange(null);
}
print('selected value $results');
onSaved(
results); //added to listen the chaneges on the onSaved method
}
},
and it works for me! 👍
Metadata
Metadata
Assignees
Labels
No labels