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
Here's the code Im using to add and remove tags (currently has clearTags() which works but removeTag(tag) does not update the textfield. Have tested and it returns true so Im assuming it is adding the tag but not updating
return FilterChip(
label: Text(collection),
selected: isSelected,
onSelected: (selected) {
setState(() {
if (selected) {
// Add the tag if not already present
if (!(collectionsTagController.getTags
?.contains(collection) ??
false)) {
// Add the tag
setState(() {
bool? results =
collectionsTagController.addTag(collection);
debugPrint(results.toString());
});
}
} else {
// Remove the tag
setState(() {
collectionsTagController.clearTags();
});
}
});
},
);
The text was updated successfully, but these errors were encountered:
Figured out the change needed, used onTabSubmitted and onTagRemoved instead of addTags and removeTags....gonna leave this here for others to see as initially looking at the api add and remove seems the more obvious way to do it and would think those would call the onTagSubmitted/onTagRemoved
Here is my textFieldTag code:
Here's the code Im using to add and remove tags (currently has clearTags() which works but removeTag(tag) does not update the textfield. Have tested and it returns true so Im assuming it is adding the tag but not updating
The text was updated successfully, but these errors were encountered: