We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
A way to get the list of value Strings instead of the integer indexes is to map into a new variable like this:
List<String> selectedItemsInString=value.map<String>((index)=>items[index].value.toString()).toList();
Here is below the "Multi dialog" example with this new variable printed:
SearchChoices.multiple( items: items, selectedItems: selectedItemsMultiDialog, hint: Padding( padding: const EdgeInsets.all(12.0), child: Text("Select any"), ), searchHint: "Select any", onChanged: (value) { List<String> selectedItemsInString=value.map<String>((index)=>items[index].value.toString()).toList(); selectedItemsInString.forEach((element) { print("selected: $element"); }); setState(() { selectedItemsMultiDialog = value; }); }, closeButton: (selectedItems) { return (selectedItems.isNotEmpty ? "Save ${selectedItems.length == 1 ? '"' + items[selectedItems.first].value.toString() + '"' : '(' + selectedItems.length.toString() + ')'}" : "Save without selection"); }, isExpanded: true, )
Sorry, something went wrong.
Closing for inactivity. Feel free to reopen if needed.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: